Saturday, August 28, 2021

Top 20 Java EE Web Developer Interview Questions

Ever since J2EE become obsolete the enterprise Java has got confusing names e..g JEE or Java EE. I am still not sure what is called officially and popularly so I have included all of them i.e. J2EE, Java EE and JEE. In this article you will find questions about Java EE platform, architecture and technolgoies e.g. JSP, Servlet, EJB, JMS, JSF, JMX, JNDI and JDBC. It will also include questions from application servers like GlassFish, WebLogic and WebSphere and messaging technologies like MQ Series, TIBCO and others. 



Difference between Servlet and JSP?

Difference between Web and application Server?

What is EJB?

Difference between EJB 2.0 and EJB 3.0?

What is JMS?

What is difference between JMS and WebSphere MQ Series?

Some basic platform stuff:

List three Collections interfaces and the basic contract of each. List concrete implementations of each, how they differ, and performance characteristics in space and time.

Describe the contract of equals and hashCode. Why is it important that if you implement one, that you implement both?

What are generics? What is type erasure and what are the consequences? What are variance, covariance and contravariance? If blank stare: why can't you assign a collection with a generic type binding of a sub type to a reference to the same collection type binding of the super type? How do you specify the type binding of the super type to allow this? How do you specify the type binding to allow type-safe insertion?


Concurrency

Explain how notify and notifyAll work, and the difference between the two. Why prefer notifyAll to notify?

What is a deadlock and how do you avoid it?

What is a race condition and how do you avoid it?

What are some of the high-level concurrency classes provided by java.util.concurrent and how do they work?


Database

What are the different statement types and why would you use each?

How do you prevent SQL injection attacks?

What are transactions? What is ACID?


Hibernate

Give an overview of Hibernate and ORM. How do you load objects into the session? What does the session do with the objects while in the session? What is the difference between getting a persistent object from the session and querying for persistent objects?

When is it better to use plain SQL instead of ORM?


Java EE

How do you configure a DataSource in Weblogic to make it available using JNDI?

What are some ways for the client to obtain a reference to the DataSource from the app server? (Spring is not the answer I am looking for)


Spring

Give an overview of how Spring Dependency Injection container works. What is the purpose of DI? How to specify bean definitions? What are the different scopes? When do beans of each scope type get instantiated?


Web Services

What is the difference between SOAP-based web services and REST-based web services?

Describe SOAP and WSDL.

What exactly is REST? What is HATEOAS? What is the purpose of each of the HTTP verbs? What is idempotence? What is content-negotiation?


OOP

What is decoupling? Why are loose-coupling coupled classes desirable? What are some drawbacks?

What is cohesion? Why are highly cohesive classes desirable? What are some drawbacks?

Describe polymorphism. What is the importance of contracts between interfaces and concrete types? Why is polymorphic code desirable? What are some drawbacks?


REf : https://www.reddit.com/r/java/comments/2lo7it/conducted_an_interview_for_a_senior_java/


No comments:

Post a Comment

Feel free to comment, ask questions if you have any doubt.