0% found this document useful (0 votes)
24 views1 page

Java Interview Questions Answers Yogesh Sabale

The document contains a collection of Java interview questions and answers covering key concepts such as Java features, OOP principles, multithreading, Spring Boot, REST API creation, database connections, and performance optimization. It explains the differences between JDK, JRE, JVM, SQL, and NoSQL databases, as well as the role of indexing in database performance. Additionally, it provides strategies for optimizing slow API responses in Spring Boot applications.

Uploaded by

Yogesh Sabale
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)
24 views1 page

Java Interview Questions Answers Yogesh Sabale

The document contains a collection of Java interview questions and answers covering key concepts such as Java features, OOP principles, multithreading, Spring Boot, REST API creation, database connections, and performance optimization. It explains the differences between JDK, JRE, JVM, SQL, and NoSQL databases, as well as the role of indexing in database performance. Additionally, it provides strategies for optimizing slow API responses in Spring Boot applications.

Uploaded by

Yogesh Sabale
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/ 1

Java Interview Questions & Answers - Yogesh Punaji Sabale

What are the main features of Java?


Java is Object-Oriented, Platform Independent, Robust, Multi-threaded, and supports Garbage
Collection.

What is the difference between JDK, JRE, and JVM?


JDK includes JRE and development tools. JRE provides libraries and JVM. JVM executes Java
bytecode.

What are the OOP principles in Java?


Encapsulation, Inheritance, Polymorphism, and Abstraction.

What is multithreading in Java?


Multithreading allows concurrent execution of multiple tasks to improve performance.

What is Spring Boot, and why is it used?


Spring Boot simplifies Java development by providing auto-configuration and an embedded server.

How do you create a REST API in Spring Boot?


Use @RestController and @GetMapping annotations to create API endpoints.

How does Spring Boot connect to a MySQL database?


Configure database settings in application.properties and use Spring Data JPA.

What is the difference between SQL and NoSQL databases?


SQL databases use tables and are structured; NoSQL databases use documents and are
schema-less.

How does indexing improve database performance?


Indexing speeds up data retrieval by reducing the number of scanned records.

How do you optimize a slow API response in Spring Boot?


Use caching, optimize database queries, and use asynchronous processing.

You might also like