You are on page 1of 1

JAVA QUESTIONS 2(24.1.

22)
1. What happens to a static variable that is defined within a method of a class?
2. How many static initializers can you have?
3. What is the difference between an if statement and a switch statement?
4. What does it mean that a method or class is abstract?
5. What is a transient variable?
6. How does Java handle integer overflows and underflows?
7. What is the difference between the >> and >>> operators?
8. Is sizeof a keyword?
9. What restrictions are placed on method overloading?
10. What is the return type of a program's main() method?
11. Which class is extended by all other classes?
12. How is final different from finally and finalize()?
13. What are the restriction imposed on a static method or a static block of code?
14. Can an Interface be final?
15. Which object oriented Concept is achieved by using overloading and overriding?
16. What happens when you add a double value to a String?
17. What is numeric promotion?
18. How to define a constant variable in Java?
19. Why is the main() method declared static?
20. What value does read() return when it has reached the end of a file?

You might also like