Interview, sometimes you don’t know what the interviewer will ask questions, and feel the level of the interviewer, should ask you more esoteric topic, but you don’t have such a psychological, some interviewers, like is not easy to play, will ask you simple questions, today small make up to you to sort out a, comparative basis for interview questions.

First, Java foundation

1. What is the difference between JDK and JRE?

2. What is the difference between == and equals?

3. If two objects have the same hashCode(), equals() must also be true, right?

4. What does final do in Java?

5. How much is math.round (-1.5) in Java?

6. Is String a basic data type?

7. What are the classes for manipulating strings in Java? What’s the difference between them?

8. Is Stringstr=” I “the same as Stringstr=newString(” I”)?

9. How to reverse a string?

What are the common methods of the String class?

11. Must abstract classes have abstract methods?

12. What are the differences between ordinary classes and abstract classes?

13. Can abstract classes use final?

What is the difference between an interface and an abstract class?

15. How many IO streams are there in Java?

16. What is the difference between BIO, NIO and AIO?

17. What are the common methods of Files?

Free Java interview questions: