It's not a secret anymore!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes non-generic ArrayList output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "non-generic ArrayList output" Watch "non-generic ArrayList output" New topic

non-generic ArrayList output

kaushal narra

Joined: Mar 20, 2013
Posts: 2

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 721
p has name "jane" and age "40. Then p is set to "wong" and "43" in line 69-40.
p1 has name = null and age = 0 in line 68.
p1's variables are never set.
kaushal narra

Joined: Mar 20, 2013
Posts: 2
Thank you , Himai Minh . It was my typing mistake. Assuming that i have set p1 and wondering why i was getting null values.
It is sorta covered in the JavaRanch Style Guide.
subject: non-generic ArrayList output
Similar Threads
Sort Arraylist by passing runtime parameter
why dont i get an exception here?
addAll and ContainsAll method in collection
why l.add() method is not working in this context?
ArrayList with JavaBean