Arvind Dua

Greenhorn
+ Follow
since Mar 28, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Arvind Dua

Congrats Victor. 95% is excellent score
16 years ago
Besides what Cindy said another criteria for deciding whether to use a StringBuffer or String concatenation is the number of String Objects you need to concatenate. If it is only 2 both are equal in terms of performance . But if the number of Strings you want to concatenate is more, I will certainly prefer StringBuffer because everytime I concatenate two Strings a new Object is created( because String objects are immutable and cannot be modified) but if its a StringBuffer, the same Object is modified to hold the concatenated String and no new Objects are created.
Hope this helps !!
[ May 22, 2003: Message edited by: Arvind Dua ]
18 years ago
There are many DeCompilers available in the market. DJ Java Decompiler is one among them. You can download it for free from : http://members.fortunecity.com/neshkov/dj.html
Hope this helps !!
Best Regards,
ArVind
As per my understanding goes, when a subclass object is created even the superclass constructor is called but in this sequence the collection of variables for the two is different. That is to say when a superclass constructor gets called from within a subclass, a new object is created that holds the variables for the superclass.
So in the code snippet given by you, there will be two instances of variable i, and we are printing the variable i associated with the subclass whose value is not set. Hence the result 0.
Hope this helps. Please correct me if i am wrong.