This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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
questions
parameter passing question for array reference
JLS understanding...
Need Help
Widening Reference Conversation