Java Structures

in these series of post, i will share my experince while going through Prof. Duane A. Bailey book Java Structures. In order to get the codes written in java Collections and Generics should be well understood.

go through these web pages step by step to get the basic idea about the JAVA collection types:

image from sergiy.ca

Generics
As an example, ArrayList supports dynamic arrays that can grow as needed, and can be implemented as:

What was:
ArrayList strings = new ArrayList();
strings.add("Hello World Buddy!");
String s = (String) strings.get(0);
is with JDK 1.5:
ArrayList<String> strings = new ArrayList<String>();
strings.add("Hello World Buddy!");
String s = strings.get(0);

No comments:

Post a Comment