• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a easy way for remeber those rules about reference casting?

 
Keen Chen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, ALL:
Rules in reference casting,
between such as
final or not-final object, interface, primitive array, reference array.........

and permutation and combination...
so many..
Who can tell me a easy to remember?...
Thx in advance.
 
Albert Lee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can upcast implicitly,but you must downcast explicitly.that's the rule.
 
Keen Chen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx Lee.
but i believe it's not so simple
 
Michael Taupitz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds simple, but is often hard to find out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic