Yurttas/PL/OOL/Java/F/02/04/02/00/TT.java

Revision as of 13:44, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="java" line start="1" enclose="div">/** * Copyright(C) 2004 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. * * P...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 1/**
 2 *  Copyright(C) 2004
 3 *  All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4 *
 5 *  Permission to use, copy, modify, and distribute this
 6 *  software and its documentation for EDUCATIONAL purposes
 7 *  and without fee is hereby granted provided that this
 8 *  copyright notice appears in all copies.
 9 *
10 *  date   : September 1, 2004.
11 *  author : Salih Yurttas.
12 */
13
14
15public class TT<T> {
16
17  public static void tA(final TA<T> o,
18                        final T t) {
19    o.output();
20
21    int n = o.getSize();
22
23    T[] ta = new T[n]; // this won't compile!
24
25    ta = o.getA0();
26
27    for(int i=0; i<n; i++)
28      System.out.println(ta[i]);
29
30    System.out.println();
31
32    o.setA0(t);
33
34    o.output();
35  }
36
37}