File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

short vs short array inconsistency?

 
Arnab Sunny Rakshit
Greenhorn
Posts: 19
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please disregard. I misinterpreted the above.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic