byte b=65;
System.out.println(b<<1);
O/p is 130.How?
CravenMorhead
Jan 23, 2017, 08:46 AM
Write both numbers in binary, if the answer isn't obvious then write down 65 in binary. Add a zero on the right hand side, (The net effect of shifting to the left). Convert resultant number back to decimal. What do you get?