aspose file tools*
The moose likes Mock Exam Errata and the fly likes RR #13 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "RR #13" Watch "RR #13" New topic
Author

RR #13

Steven YaegerII
Ranch Hand

Joined: May 31, 2000
Posts: 182
I am improving slowly, though when I code some of these roundups, I feel like I'm regressing...
As Rules Roundup answer #13 says that byte c = (byte) a + b; is a valid line, and because it seems to me like it should work, I cannot understand why it doesn't work in the code below. What could I be doing that is most likely so obvious that it would bite me? (none of my variations work either, though it works in System.out.println( a + b ).

How come the last line doesn't make var c equal a (byte) 5?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: RR #13