Java Quiz

1. What is the default value of a boolean variable in Java?

2. What is the result of the expression (int) 10.5?

3. Which data type would you use to store a small decimal value?

4. What is the size of a float variable in Java?

5. What is implicit type casting?

6. Which of these operators has the highest precedence in Java?

7. What is the result of 5 % 2?

8. What is widening type casting in Java?

9. Which operator is used for comparison in Java?

10. What is the size of a char variable in Java?

11. What is the output of 9 / 2 in Java?

12. Which of the following is a valid long literal in Java?

13. What is the result of 10 >> 1?

14. What is narrowing type casting in Java?

15. Which operator is used to increment a value in Java?

16. What is the size of an int variable in Java?

17. Which of the following is the result of 3 & 2?

18. What does the += operator do?

19. What does 4 << 1 do in Java?

20. What is the output of 7 >> 2?

Java Quiz

1. What is the default value of a boolean variable in Java?

2. What is the result of the expression (int) 10.5?

3. Which data type would you use to store a small decimal value?

4. What is the size of a float variable in Java?

5. What is implicit type casting?

6. Which of these operators has the highest precedence in Java?

7. What is the result of 5 % 2?

8. What is widening type casting in Java?

9. Which operator is used for comparison in Java?

10. What is the size of a char variable in Java?

11. What is the output of 9 / 2 in Java?

12. Which of the following is a valid long literal in Java?

13. What is the result of 10 >> 1?

14. What is narrowing type casting in Java?

15. Which operator is used to increment a value in Java?

16. What is the size of an int variable in Java?

17. Which of the following is the result of 3 & 2?

18. What does the += operator do?

19. What does 4 << 1 do in Java?

20. What is the output of 7 >> 2?