Q1.
I have compiled & run the foll pro.(exam cram)
the output is
20
16
20
16
16
class Wrap{
public static void main(
String args[]){
String s="20";
byte b1=Byte.parseByte(s);
byte b2=Byte.parseByte(s,8);
Byte b3=Byte.valueOf(s);
Byte b4=Byte.valueOf(s,8);
//byte b5=Byte.decode(s);
String s2=Byte.toString(b2);
System.out.println(b1);
System.out.println(b2);
System.out.println(b3);
System.out.println(b4);
//System.out.println(b5);
System.out.println(s2);
}
}
I could not follow how the value r derived
please explain me in detail about
parseByte() & ValueOf()
Also the foll. line gives some error.(in the above code its the comment)please help.
byte b5=Byte.decode(s);
Q 2 kindly give me the site add of errata for
a. exam cram
b.training guide(jamie jawrski)
c.exam guide by barry boone.