Christian Joseph

Ranch Hand
+ Follow
since Jan 07, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Christian Joseph

hehe where on the same topic.... hmm, i dunno yet the answer

but the above post solve your problem about the QUESTION on the self Test
is Reading the book for 30 minutes a day is good, becuase i have 2 jobs
7 years ago
thanks you clear my doubts!!! thanks RANCHERS!!! phew!
in the seft test in the SCJP book
i get a mistake on this one

Identifiers (name)doesn't matter.. Yap thats will run smooth

nitin sethi wrote:Hi Aditya,

I hope the below explanation clears your doubt. If a class contains an object as its instance member, creating that class's object creates one more object corresponding to that instance member.



Regards,
Nitin Sethi



hey another Question what if the Integer "obj" instance variables is not declared. will it create an object if i type "new IntObjClass"
so what happened here is obj is pointing two objects(new IntObjClass and Integer Object) on the HEAP. so once the obj is declared null, the two are left on the blackhole(i prefer this term instead of heap )

TY MS NAVEEN MADARAPU!
yap the post above solve all of it

is it like the word "Redefining?

Ogeh Ikem wrote:The statement Dozens[] da = new Dozens[3] creates the first object i.e. a Dozens array (1). The statement da[0] = new Dozens() creates 2 objects i.e. a Dozens object (2) and an int array (3). The statement Dozens d = new Dozens() creates 2 objects i.e. a Dozens object (4) and an int array (5). Total objects created is 5.

The statements d = null and da[1] = null make objects (4) and (5) eligible for GC at line 14. Both statements are necessary or else objects (4) and (5) wont be eligible for GC at line 14.


THANKS!!! IT REALLY help me alot hearing from you guys!!
i get it now, Thanks! Ms. Naveen Madarapu...

so whenever i say "new Dozens" it will crreate a Dozen Object, PLUS a instance member like the int in the example

then since "d" reference object "NEW DOZENS()" has pointing two f***n thing the "d" and the "d[1]", which is become null, the line broke and then the DOzen of d and the int object, where left on the blackhole

thanks ! did i get it?

nitin sethi wrote:Hi Aditya,

I hope the below explanation clears your doubt. If a class contains an object as its instance member, creating that class's object creates one more object corresponding to that instance member.



Regards,
Nitin Sethi



if i put another int to that "IntObjClass" it will create 2 additional?


so after the main run, it will create "IntObjClass" object, and Integer object, and an "int" object? ?
which has a total of 3?
after i read 2 chapter of SCJP of katty and bertes, i think it will run smooth!