J
Q. What is the output for the below code ?
1. public class Test{ 2. public static void main(String[] args){ 3. int i = 010; 4. int j = 07; 5. System.out.println(i); 6. System.out.println(j); 7. } 8. }
By placing a zero in front of the number is an integer in octal form. 010 is in octal form so its value is 8
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Which is right way to declare Array?
Q. Choose the correct identifier for a method name in Java.
Q. Which of these is not a bitwise operator?
Q. An attempt to add null key to a TreeMap will result in
Q. Which is commonly used method of ByteArrayOutputStream class?
Q. Which component is responsible to run java program?
Q. What is a parameterized constructor in Java?
Q. Which of the following is used with the switch statement?
Q. Which of this method of Thread class is used to change the state of a thread to blocked state?
Discusssion
Login to discuss.