aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assigning a value larger than the variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Assigning a value larger than the variable" Watch "Assigning a value larger than the variable" New topic
Author

Assigning a value larger than the variable

Tiago Bonito
Greenhorn

Joined: Jun 22, 2004
Posts: 2
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

Joined: Jul 02, 2002
Posts: 1865
Please see JLS Section 5.1.3, Narrowing Primitive Conversions.


Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
Tiago Bonito
Greenhorn

Joined: Jun 22, 2004
Posts: 2
Thanks a lot Dan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assigning a value larger than the variable