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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "byte problem" Watch "byte problem" New topic
Author

byte problem

raj koura
Greenhorn

Joined: Oct 10, 2000
Posts: 11
i am using a byte variable because the value to be stored is an integer between 1-50.
byte x;
x = 1;
x = x + 2; // problems (explicit cast required)
is there any other way to execute this without having to use typecasting?
raj.
 
jQuery in Action, 2nd edition
 
subject: byte problem