File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assigning a value larger than the variable

 
Tiago Bonito
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly happens when you try to assign a value larger than the variable, casting ? For example, assigning 128 to a byte variable ?
:roll:
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see JLS Section 5.1.3, Narrowing Primitive Conversions.
 
Tiago Bonito
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Dan
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic