aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes short vs short array inconsistency? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "short vs short array inconsistency?" Watch "short vs short array inconsistency?" New topic
Author

short vs short array inconsistency?

Arnab Sunny Rakshit
Greenhorn

Joined: Jun 07, 2013
Posts: 19

why does the short array assignment work but the short assignment not work?



However if I do this then compiler ain't happy !



Does this mean that an auto cast (from wider to leaner) is happening when array elements are initialized? But no such downcast happens during plain primitive assignment?
Arnab Sunny Rakshit
Greenhorn

Joined: Jun 07, 2013
Posts: 19

Please disregard. I misinterpreted the above.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: short vs short array inconsistency?