In this article I revealed all the Java interview questions asked to me from 2014 to 2022. I have attended more than 50 interviews since 2010.
Mostly interviewer asked 10 to 20 java interview questions in a single interview. After each java interview I used to make a note of interview question so that I can refer them for the next interview.
To help Java freshers, I want to provide a list of all valuable Java interview questions.
So Java professionals should get prepare for these interview questions. Once you are ready then go and crack your interviews. Best of luck!
I can promise 60 percentage success if you prepare these questions.
19 Java Interview Questions asked to me in Kewill [2014]?
Please find the list of java interview questions asked to me in Kewill. I recommend to prepare it before going for any interview.
- Can you please describe your roles and responsibilities in your project?
- I want to show the data table rows in my UI. Which collection should I use?
- What is synchronization and Serialization in Java?
- What is ServletFilter and what is its use?
- What is @ and include directives in JSP?
- What is the use of DWR Ajax?
- What is Marker Interface?
- Have you used EJB, which one you were using Stateless or Stateful?
- Do you know how to write custom tag in JSP? Are you using custom tags in your JSP?
- Suppose I want to make a java class as a Tag class, How can I convert it?
- How to use Jboss drools?
- Which build tool are you using?
- How to write a junit test case? Have you written any time?
- How to implement Jboss drools in your project?
- What kind of Injection is possible in Spring?
- I want to write collections in Spring? How will I write it?
- Which IDE are you using? Which build tool are you using?
- Which database are you using?
- What is the use of DWR Ajax? How have you configured it with JSF?
- What is autoboxing in Java?
Tech Mahindra – java developer interview questions [2015]?
Tech Mahindra asked me these java interview questions for a developer position in 2015. These questions repeated in java interviews over time to time.
- What are the basic roles and Responsibilities you have in your project?
- How have Jboss drools been configured in your project?
- How have you integrated JSF with Spring?
- What are the benefits of using Spring? Can we do initialization everytime?
- Have you used a JSF template?
- Have you used JSF tiles?
- How have you written tiles in your project? How are you using tiles in JSF? Why are you not using Struts tiles? How are you using JSF templates? – Same question in different ways.
- How have you configured Jboss drools?
- Explain Jboss drools?
- What is the life cycle of JSF?
- Have you written a converter? Have you written validators?
- Have you written Facelets?
- What are the build tool you are using?
- How are you doing rollback in the database?
- Do you have knowledge on Stored procedures?
- How are you displaying feedback messages in UI?
- How are jboss drools called? How is it working in your project?
whishworks.com interview questions – [April 2014]
whishworks.com asked these java interview questions to me.
- Do you have experience in web services, liferay portals?
- Can you explain about your professional experience?
- What is the work basically you are doing from the last six months?
- So many questions on try catch block – like return statements in the try block, like return statements in try block and in finally block?
- What is the difference between the final, finally and finalize()?
- How can I configure a runtime exception in try catch block? – One well desrve article for runtime exception.
- What is synchronization and Serialization in Java?
- How to send a request to another Servlet?
- What is the difference between requestDispatcher and sendRedirect?
- What are the JSP implicit objects?
- Is JSP thread safe?
- What is the life cycle of JSP?
- How will you configure Jboss drools?
- Can you explain how you are writing code in Jboss drools?
- I want to set cookies. How will I do it?
Valuelabs – 18 questions [November 2014]
ValueLabs is an Indian multinational information technology services and consulting company. It was founded in 1997 and is headquartered in Hyderabad, India.
The company provides a range of services, including software development, product engineering, quality assurance, remote infrastructure management, and digital transformation.
Valuelabs is one of the demanding software company to start your career.Here are the list of java interview questions asked to me.
- What are immutable classes? How to make a class immutable? Can we initialize a java immutable class. One well desrve article to read on immutable class in Java
- What is Serialization in java? How to implement Serialization in java?
- What is Synchronization? How to implement Synchronization in java?
- What are threads? How to implement a thread?
- What is Servlet? Is Servlet a class or interface?
- What are the methods in servlet? How does a servlet initialize?
- What are the methods in a Servlet?
- What is the lifecycle of a Servlet?
- What are Servlet Filters? How to implement Servlet Filters?
- Have you written the custom tags in JSP?
- What is the Spring IOC module?
- How many types of Dependency Injections are there?
- What are the tasks mainly you have handled in Spring?
- Is Session a class or interface in Hibernate?
- How to create a Session Object in Hibernate?
- How to write a mapping file in Hibernate?
- How to write a Session Factory in Hibernate?
- What is a struts controller?
9 Questions asked in CallidusCloud [November 2016]
CallidusCloud was a cloud-based sales and marketing platform. It was founded in 1996 and headquartered in Dublin, California, USA. In 2018, SAP SE acquired CallidusCloud.
Below is the list of Java interview questions asked to me for. a lead Java developer role in 2016.
- What are threads?
- I have to perform 4 tasks? How can I write a thread for them?
- What are the jsp implicit objects?
- Have you implemented tags in jsp?
- What is the difference between JSP and JSF?
- What are the methods in Servlet?
- How to persist a java object?
- How are you calling a hibernate mapping file in your project?
- How to load hibernate mapping files? How are you maintaining your hibernate mapping files in your project?
6 Expected Questions for Java jobs asked frequently [year 2014-2018]
Here is the list of common java interview questions asked to me frequently. I want you guys to prepare it before going to any interview.
- What are Checked and Unchecked Exception in Java? Give at least 5 examples?
- Increment related questions i++, ++i, i=i+10; – Arithmetic operations in Java
- Can we create an object of a final class?
- Can we declare a Constructor as final?
- Why is String immutable?
- How to create a String Object using char?
7 Interview Questions asked for Java position in Polaris [March 2015]
Polaris Software Lab Limited (commonly known as Polaris) was an Indian multinational software company. It provided software solutions to banking and financial services institutions worldwide.
The company was founded in 1993 and was headquartered in Chennai, India with operations in North America, Europe, and Asia-Pacific. In 2016, Polaris was acquired by Virtusa Corporation, a global provider of digital engineering and IT services.
Please find the java interview questions asked to me in Polaris, a well know software company.
- Please explain your role in current project? How will you evaluate yourself in your project? Explain technologies have you used with your responsibilities?
- What tasks have you felt good and bad in your project?
- What is Log4j? How will you load it / How will you create its object? Explain Best way to initialize Log4J ?
- What is the difference between session and application?
- What are the JSP implicit objects?
- What is the inversion of control? Describe it? Why are we using inversion of control?
- What is the left and right join in mysql?
22 interview questions asked in Capgemini for Java developer position [2015]?
Capgemini is a global consulting, technology, and outsourcing services provider headquartered in Paris, France. The company was founded in 1967.
It has grown to become one of the world’s largest consulting and technology services companies. Here is the list of 22 interview questions asked to me in Capgemini.
- What is the OOPs concept?
- What are access modifiers in Java? What is the difference between private, public, protected and default?
- What is the final keyword in java?
- How can we access a static field in java and outside its class?
- Can we access private variables outside a java class?
- Can we declare an empty final variable?
- What is serialization in java? What is the meaning of the variable that is inside the serializable class in java?
- What are the methods we need to override for a Serializable interface?
- What are collections?
- What is the difference between Array and ArrayList?
- What are the features of Java 1.5?
- What is Generics in Java?
- What is the difference between ArrayList and HashSet?
- What is the difference between List, Set and Map?
- What is the difference between HashSet and HashMap?
- What is JDBC? How will you get a JDBC connection?
- What is the difference between Statement and PreparedStatement?
- I want to get the complete resultset of an employee table. How will I do it using Statement and PreparedStatement?
- How can we delete a particular set of Names in Collections?
- What are the advantages of JSP over Servlet?
- What is the dialect in Hibernate?
- I have 2 types of databases. How can I get connection for both the databases using Hibernate?
23 Interview questions asked in Oracle for devloper position [2014-1016]
Oracle is one of the world’s largest software companies, with operations in more than 175 countries and territories. In addition to its products, Oracle also provides consulting, support, and education services.
Here is the list of 22 java interview questions asked to me in 2015.
- Can you explain your project at a high level?
- What technologies have you worked on?
- Can multiple Servlets talk to each other? How can we do it?
- What is the difference between Stack and Heap in terms of multithreading?
- Explain your understanding about final, finally and finalize()?
- What is encapsulation in java?
- What are access modifiers in Java?
- What is the main difference among private, default, protected and public?
- What is Serialization in Java?
- What are transient variables in java? Can you explain where we use transient in java for serialization?
- What is normalization in Database?
- What is the view? What is the use of views in java?
- If I want to update some records in the database, can I do it using views?
- What is the difference between subquery and correlated subquery?
- We have 2 table employees and a department. Department has foreign keys for employees. How can we select the department in which maximum number of employees is more than or equal to 5?
- What is the difference between a backing bean and managed bean in JSF?
- What is a view object in JSF?
- What are triggers and stored procedures in the database?
- What is the difference between Statement, PreparedStatement and Callable?
- What is Enumeration?
- What is the difference between Enumeration, Iterator and LinkedListIterator?
- Where do we use Serialization in Java?
- What is marker interface in Java?
5 Java interview questions asked in Aricent for developer position [2016]
Aricent’s services include software development, product engineering, testing and quality assurance, user experience design, and technical support.
The company has a particular focus on helping clients navigate the challenges of digital transformation and the rapidly evolving technology landscape.
Please find the list of 5 java interview questions asked to me in Aricent.
- I have one dictionary application? Which one will we use, List or LinkedArrayList?
- How do we create a HashMap?
- What is loading and caching in Hibernate?
- What is Spring MVC?
- Please explain your project and what technologies are you working on now?
8 commonly asked interview questions on String class:
String class is very important. It is frequently asked in java interviews.
- How can we make a String from a character array?
- How to replace a specific character in a String object? Is it possible?
- How to replace a specific String occurrence?
- How to delete a specific String Occurence?
- How to remove the spaces at beginning and at the end of a String?
- We have two char sequences? How can we join them and make a String?
- How can we get a part from a String?
- How to convert a String into the method?
Conclusion
Now in this article you can find 150 java interview questions. These are based on my experience. Hope these java interview questions will help you to crack java interviews.
In case you have any java related interview questions, please drop a comment.
Hope you have also read my article for Java Freshers job skills – Technical and Personal