Core Java Interview Questions
- Why the container does not support multiple layout managers
- Which class is the super class for all classes in java.lang package?
- What are differences between Enumeration, ArrayList, Hashtable and Collections and
- How many JVM could be run on an operating system. if only one then what is the logical reason.
- What is JVM Heap Size? How does it affect the performance of the Application?
- We know that Object class is super class of every class & a class extends only one class. so How is it possible to a class to extend other than Object class?
- What is difference between string and stringtokenizer?
- How can you load DLL files when your java class is loading first time ?
- If two overloaded methods are - test(Object xyz) and test(Customer cust) [Assume Customer is a class with member name of type String]. Now if we call test(null), which method will be called? why?
- When are you using arraylist and linkedlist?
- When are you using hashmap and hashtable?
- Can we have run() method directly without start() method in threads?
- How to use JNI in Java? What are Struts and Jini? How to apply native code in Java?
- Can we have run() method directly without start() method in threads?
- How to use JNI in java? and what are Struts and jini?and how to apply native code in java?
- Strings are immutable.But String s="Hello"; String s1=s+"World"; S.O.P(s1); means printing "HelloWorld". How ?
- What is the difference between classpath and path variable?
- If we have two public classes in a single java file, How I have to give the name of the particular java file and How I can compile it?
- Is there any difference between Execution Engine and the JIT in java?
- How single threaded model works after implementation in class, basically architecture point of view?
Common Java Interview questions
Java interview questions can be difficult. So you should be very careful about your preparation prior to appearing for any Java interview question. So you need to take an in-depth preparation before facing your interviewer. This article sheds light on different types of java questions that are common to find in different interview sessions. Quite obviously, being a java developer is not only a prestigious career option but also it offers good compensation as well.
There is a great variety of questions that can be asked during interview. These may include queries regarding difference between String and StringBuffer; difference between interface and abstract class; experience with open source; difference between EJB and Hibernate; usage of Spring; knowledge about Websphere and WSAD; discussion about struts; class in JDK; difference between final, finally and finalize; experience with XP/Agile; JUnit; etc.
Few interviewers may instill answering practical questions during java interview session. He may ask you to define abstract class with good examples; interface with examples; explanation of synchronization. The interviewer may also show you an example, and ask you relevant questions based on the given example. The interviewer may also ask you to write program code as instructed the interviewer. These types of questions may cover different areas of core java, JSP/Servlets, EJB, JMS, JDBC, RMI and Swing.
Due to its lucrative career option, one may choose the appropriate career path to become a java professional. In fact, if someone is aspired for being a java professional, he may choose to appear for different java certification exams as well.