This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes byte and short Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


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

byte and short

mi te
Greenhorn

Joined: Mar 09, 2006
Posts: 29
Just a quick question I'd like to ask. Is there a mark for byte and short variables like F for float and D for double?
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
No, for the integral types there is only L (or l) for long.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
mi te
Greenhorn

Joined: Mar 09, 2006
Posts: 29
I'm sorry about the tedious question I asked. I just wondered, when defining a size for an array, it might be quicker to just write

int ary[] = new int[3B]; //B for byte

instead of

byte b = 3;
int ary[] = new int[b];

But anyway the byte number will be converted to int, so I'm talking gibberish, once again sorry.

Thanks for your reply anyways.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: byte and short
 
Similar Threads
how is this answear correct?
Type conversion not specified by JLS
short and byte
Marcus Exam #1, Q 26
how to convert byte array into short??