Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Assigning a value larger than the variable  RSS feed

 
Tiago Bonito
Greenhorn
Posts: 2
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Dan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!