0% found this document useful (0 votes)
2 views3 pages

java_fullstack_interview_cheatsheet

java interview chartsheet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

java_fullstack_interview_cheatsheet

java interview chartsheet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Hibernate

Hibernate is an ORM (Object-Relational Mapping) framework for Java that maps Java objects to
database tables. It reduces boilerplate JDBC code and handles transactions, caching, and query
generation. Key Features: HQL, Criteria API, Caching, Lazy Loading, Annotations for mapping.

Common Interview Q&A;


Q: What is Hibernate?
A: An ORM framework for mapping Java objects to relational database tables.
Q: Difference between Hibernate and JDBC?
A: Hibernate automates mapping and query generation; JDBC requires manual SQL.
Q: What is HQL?
A: Hibernate Query Language, object-oriented query language similar to SQL.
Q: Explain caching in Hibernate.
A: First-level cache (Session), Second-level cache (SessionFactory).

Java
Java is a high-level, object-oriented, platform-independent programming language. Core Concepts:
OOP principles, JVM architecture, collections, exceptions, multithreading.

Common Interview Q&A;


Q: What is JVM?
A: Java Virtual Machine executes Java bytecode.
Q: Difference between JDK, JRE, JVM?
A: JDK includes JRE + development tools, JRE runs Java programs, JVM executes bytecode.
Q: Explain OOP concepts.
A: Encapsulation, Inheritance, Polymorphism, Abstraction.

JPA (Java Persistence API)


JPA is a specification for accessing, persisting, and managing data in Java objects to relational
databases. Hibernate is one implementation of JPA.

Common Interview Q&A;


Q: What is JPA?
A: A Java specification for object-relational mapping.
Q: Difference between JPA and Hibernate?
A: JPA is the specification; Hibernate is an implementation.
Q: What are JPA annotations?
A: @Entity, @Id, @GeneratedValue, @OneToMany, @ManyToOne.

JSP (JavaServer Pages)


JSP is a technology to create dynamic web pages using Java in HTML. It allows embedding Java
code into HTML pages and runs on the server.
Common Interview Q&A;
Q: What is JSP?
A: A server-side technology to create dynamic content.
Q: Difference between JSP and Servlet?
A: Servlets are Java classes; JSPs are HTML with embedded Java code.
Q: What are JSP directives?
A: page, include, taglib.

EJB (Enterprise JavaBeans)


EJB is a server-side software component that encapsulates business logic in enterprise
applications. Types: Session Beans, Message-Driven Beans, Entity Beans (deprecated).

Common Interview Q&A;


Q: What is EJB?
A: A component-based architecture for modular enterprise applications.
Q: Types of Session Beans?
A: Stateless, Stateful, Singleton.
Q: Difference between EJB and Spring?
A: EJB is Java EE spec; Spring is a lightweight framework.

Apache Struts
Apache Struts is an MVC framework for creating Java web applications. It uses Action classes,
XML configuration, and JSP for the view layer.

Common Interview Q&A;


Q: What is Struts?
A: An open-source MVC framework for Java web apps.
Q: Difference between Struts 1 and Struts 2?
A: Struts 2 has improved architecture, uses interceptors, and POJO-based actions.
Q: How does Struts implement MVC?
A: Model: business logic, View: JSP, Controller: ActionServlet.

SQL (Structured Query Language)


SQL is a standard language for managing and manipulating relational databases. Includes DDL,
DML, DCL, and TCL commands.

Common Interview Q&A;


Q: What is SQL?
A: A language to store, retrieve, and manipulate data in databases.
Q: Difference between SQL and MySQL?
A: SQL is a language; MySQL is a database system implementing SQL.
Q: What is a JOIN?
A: A way to combine rows from two or more tables.
Q: Types of JOIN?
A: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN.

You might also like