wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Casting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Casting" Watch "Casting" New topic
Author

Casting

Abhi vijay
Ranch Hand

Joined: Sep 16, 2008
Posts: 509
Source:
K & B Book.




Here in Line1 (Redwood)new Tree(), so the reference type of t1 in go2 method becomes Rosewood, or it remains the same Tree? Please explain what is happening in line1,2. I am getting confused
Himanshu Gupta
Ranch Hand

Joined: Aug 18, 2008
Posts: 598

web page This is a recent post on the same question.


My Blog SCJP 5 SCWCD 5
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Casting
 
Similar Threads
Please explain DownCast Code from K&B
Down Casting to subtype
Please help me understanding this
Overloading and casting
A doubt in the type casting