This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes JLS understanding... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "JLS understanding..." Watch "JLS understanding..." New topic
Author

JLS understanding...

Santhosh Kumar
Ranch Hand

Joined: Nov 07, 2000
Posts: 242
Hi, JLS says
From any array type SC[] to any array type TC[], provided that SC and TC are reference types and there is a widening conversion from SC to TC.
is widening conversion. I tried,
int a[] = new int[10];
long l[];
l = a;
it throwning compile error. Can some body tell me the meaning of the above sentence?
Maha Sam
Greenhorn

Joined: Nov 27, 2000
Posts: 5
hi
I think you should read it carefully it say reference types and not primitive types.What you are trying to do is with primitive types thus giving you the compile time error.
Sam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JLS understanding...
 
Similar Threads
JLS understanding...
Need Help
Widening Reference Conversation
parameter passing question for array reference
questions