This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

Downcasting to Byte

 
Sridhar Padala
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Report post to moderator
class Magenta {
static byte a = (byte)127, b = (byte)128, c = (byte)255, d = (byte)256;
public static void main(String args[]) {
System.out.print(a + " " + b + " " + c + " " + d);
}}

How to type cast to byte if the value exceeds byte range? Please explain in detail

Thanks in Advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on books.
 
    Bookmark Topic Watch Topic
  • New Topic