public class IntListTest { public static void main (String [] args) { int [] a = new int [] { 3, 6, 19, 71 }; IntList X = new IntList (0, null); X = X.makeList (a); System.out.println ("List created! "); X.printList(X); IntList Y = new IntList (0, null); int [] x = new int [] { 3, 2, 32, 57, 72, 98, 32, 323 , 232}; Y = Y.makeListr(x); System.out.println ("List created! "); Y.printList(Y); System.out.println ("List Count: " + Y.countList(Y)); } } %java IntListTest List created! Head-0 ---- 3 Head-1 ---- 6 Head-2 ---- 19 Head-3 ---- 71 List created! Head-0 ---- 3 Head-1 ---- 2 Head-2 ---- 32 Head-3 ---- 57 Head-4 ---- 72 Head-5 ---- 98 Head-6 ---- 32 Head-7 ---- 323 Head-8 ---- 232 List Count: 9
Monday, October 8, 2007
Linked List Constructor Functionality Testing
Subscribe to:
Post Comments (Atom)
Just some daily notes ...
Things I'm into now...
Blog Archive
-
▼
2007
(29)
-
▼
October
(15)
- Deconstructing a Scheme recursive function and imp...
- Anasi Boys
- Iterator for Collection and Nested Class
- The Uninvited!
- Inheritence and PolyMorphIsm
- Iterator Example
- Java Library ArrayList
- Inserting into an array non-destructively
- Singly linked list operations...
- PascalTriangles once more!
- Sieve of Erotosthenes
- Linked List Constructor Functionality Testing
- The Linked List Maker method
- Simple Linked List operations
- Old blogs before Day 0.
-
▼
October
(15)
No comments:
Post a Comment