13 - PDFsam - 1. Language Fundamentals
13 - PDFsam - 1. Language Fundamentals
The most significant bit acts as sign bit. "0" means "+ve" number and "1"
means "–ve" number.
"+ve" numbers will be represented directly in the memory whereas "–ve"
numbers will be represented in 2's complement form.
Example:
byte b=10;
byte b2=130;//C.E:possible loss of precision
found : int
required : byte
byte b=10.5;//C.E:possible loss of precision
byte b=true;//C.E:incompatible types
byte b="ashok";//C.E:incompatible types
found : java.lang.String
required : byte
byte data type is best suitable if we are handling data in terms of streams either from
the file or from the network.
Short:
Int:
nd
DURGASOFT, # 202,2 Floor,HUDA Maitrivanam,Ameerpet, Hyderabad - 500038,
13 040 – 64 51 27 86, 80 96 96 96 96, 9246212143 | www.durgasoft.com