Java Interveiw Ques Ans Prep - ayushmathur94/DirectQuesAns_Prep GitHub Wiki

Java:

  1. What is OOP and what are the advantages?   Answer

  2. What does string immutable means ? How / Why strings are immutable ?   Answer

  3. What are the classes that support string mutability / mutable strings ?   Answer

  4. Difference between String Builder and String Buffer? Answer

  5. Difference Between Array and ArrayList? Answer

  6. Difference Between List, Set, and Map? Answer

  7. What is WeakHashMap? Answer

  8. What type of inheritance supported in java? Answer

  9. What are the Entity Relationships supported in Java-like one-to-one?

  10. Does java 8 support multiple inheritance ? Can you define a method in the interface? Answer

  11. What is Static Overloading and Dynamic Overloading? Answer

Read this !! overloading overriding ques ans

  1. What is a Serializable interface? Answer see this !!
  2. What is a Transient variable? Answer
  3. How to lock a class? What are the ways to achieve synchronization? Answer
  4. What are inner classes and what are the types? Answer
  5. What is a singleton pattern and explain its real time usage. Answer
  6. How do you map entity and table?
  7. What are wrapper classes in Java? Answer
  8. What is constructor ? Answer
  9. When you can use the super keyword ? Answer
  10. What is the difference between == and .equals() Method in Java ? Answer
  11. What is volatile keyword in Java ? Answer
  12. What is a marker interface ? Answer
  13. What is object cloning in Java? Answer

MySQL:

How to add Constraints for an existing table (Syntax) Explain DML Operations What is a composite key? How to add and Drop a Foreign key? Explain joins? What happens if you use inner join with no conditions? What is Stored Procedure?

Angular:

  1. What are the advantages of angular?
  2. Angular Directory Structure
  3. Explain Angular Routing?
  4. Some questions on pipes?

JavaScript:

  1. What is the closure?
  2. Is your Application browser Friendly?

Git:

  1. What is Git?
  2. Explain a few git commands?
  3. Explain few syntaxes for git commands?
  4. How to create a new branch?

Below are some of the questions they asked when I attended at 3+ years of experience.

  1. Explain your Application architecture
  2. Find Length of string without using length() //3. What is a Serializable interface? //4. What is a Transient variable?
  3. Sample program for linked list implementation. Which is preferred arraylist or linkedlist?
  4. Program to find the number of occurrences of a character in a file.
  5. Why do we go for jpa and ejb? Can we use any other framework?
  6. Which is the package you are familiar with?
  7. How to find number of active user sessions? //10. How to lock a class? What are the ways to achieve synchronization? //11. What are inner classes and what are the types? //12. What is a singleton pattern and explain its real time usage.
  8. Why you are looking for a job change?
  9. Where the configuration files are stored in your application?
  10. Rate yourself in java out of 10. //16. How do you map entity and table?
  11. Explain sample architecture for retrieving employee details from table.
  12. How quickly you could adapt if you have been put in spring and hibernate?
  13. What is WSDL? What is the advantage of webservices?

Apart from this if you want to know some of the frequently asked questions refer the below links, http://www.javatechblog.com/tag/java-interview-questions/ http://www.javatechblog.com/tag/java-coding-interview-questions/


You should work on collection multithreading exceptional handling string spring hibernate structs and servelets as well. You have to good in these sections in theory as well as programming part as well. For programming part they will ask the questions from hash map array linked list data structure algorithms questions will be there.


What is oops? What are inheritance and its types? explain it with real life examples? Write down a code using inheritance and overriding. Write down a code to implement the hash map. Difference between pointer and reference .


Encapsulation vs Abstraction

Encapsulation is data hiding(information hiding) while Abstraction is detailed hiding(implementation hiding). While encapsulation groups together data and methods that act upon the data, data abstraction deal with exposing the interface to the user and hiding the details of implementation.