Core java interview questions on Java variable and operator
1. What is the difference between declaring variable and defining a variable?
2.How can I swap two variables without using a third variable?
3. What do you understand by a variable?
4. What is transient variable?
5. How to define a constant variable in Java?
6. What is the best practice to declare a java file having only constant ?
7. What is a local, member and a class variable ?
8. If a variable is declared as private, where may the variable be accessed ?
9. What value would the value if String type automatically initialized ?
10. What is the difference between a field variable and a local variable ?
11. What’s initial value of object reference which is defined as an instance variable ?
12. What is the difference between the boolean & operator and the && operator ?
13. How many primitive types available in Java ?
14. To what value is a variable of the boolean type automatically initialized ?
15. Are arrays primitive data types ?
Check out all interview questions:
- All core java interview questions
- All java collections interview questions
- Face to face java Interview questions
- Telephonic java interview questions