It`s just an example..I mean what can i do with list`s objects except printing..!?
Type: Posts; User: MryJaho
It`s just an example..I mean what can i do with list`s objects except printing..!?
yeah ..there`s no problem for printing..but..for example imagin that list[i] is belong to class Class1
class Class1 {
private int a;
}
can I use list[i].a ?
or just can print list[i] ...?
Dear Friends...Hello..!
Look at this example..:
import java.util.ArrayList;
ArrayList<Object> list = new ArrayList<Object>();
list.add(10); // boxing converts to instance of Integer...
at first i have a main problem..i dont which IDE u use..i use Netbeans 6.5 ..
at first that i start a new project i have a main class..then define some other classes in that source package..
now...
tnx for answering..
but..i dont know what`s the diffrent?
if u mean so:
public void setHeadNodesData()
{
List tempList = new List[vertices];
for ( int i = 0; i < vertices; i++ )
...
Exception in thread "main" java.lang.NullPointerException
at testapp.Graph.setHeadNodesData(Graph.java:44)
at testapp.Main.main(Main.java:19)
Dear myFriends..Hi..!
i dono know...