Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.313 :

Posted: Mon Sep 19, 2011 12:41 am
by ETS User
Hexadecimal values can be denoted by prefixing with 0x ( Zero and upper or lower case 'x ') so 0x10 is equivalent to 16
decimal. Octal values can be denoted by prefixing with 0 ( Zero ) so 010 is equivalent to 8 decimal.

we don't normally use hexadecimal or Octal - so for exam how does one know that 0x10 is 16? or say know 0x10101 would be what?? Any shortcuts to know what Hex, binary or octal representation may mean

Re: About Question com.enthuware.ets.scjp.v6.2.313 :

Posted: Mon Sep 19, 2011 9:22 am
by admin
ETS User wrote:Hexadecimal values can be denoted by prefixing with 0x ( Zero and upper or lower case 'x ') so 0x10 is equivalent to 16
decimal. Octal values can be denoted by prefixing with 0 ( Zero ) so 010 is equivalent to 8 decimal.

we don't normally use hexadecimal or Octal - so for exam how does one know that 0x10 is 16? or say know 0x10101 would be what?? Any shortcuts to know what Hex, binary or octal representation may mean
You will not be required to know the conversion logic from one base to another or required to convert any big number for the exam (although as a s/w professional, it is desirable to know :) )

Just knowing that any number that starts with 0x is a valid hex number is sufficient.

Re: About Question com.enthuware.ets.scjp.v6.2.313 :

Posted: Mon Sep 19, 2011 2:08 pm
by Guest
Yes, I could guess it was hexanumber but I had problem in finding that the answer would be 34 (16 +10 + 8) and not other options (28, 30, 36) without being able to convert. So are there any ways one should prepare for such questions?