Originally posted by Jamal Hasanov:
Hi, Manish
0x0F and 0xF values are equal.
You can test it so
public static void main(String [] args) {
int a = 07;
int b = 007;
int c = 0xF;
int d = 0x0F;
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
}
That's all. If you're preparing for SCJP exam, you should try everything with java code. because this way, you are understanding basic principles deeply.
Jamal
Jamal,
I
*DO* understand they are same values
What I am referring to is "Type in" type of questions of the exam, where you are required to enter the answer by typing it in the TextField, in which case how you enter it *DOES* matter, and as I said earlier
my answer 007 was assessed as an incorrect answer in favour of 07 by the mock engine; hence the question.
Regards,
- Manish