Junior Java Developer

10+ Junior Java Developer Interview Questions and Answers for Freshers

Updated 27 Aug 2024

Popular Companies

search-icon

Q1. Why we need Oops concepts? What is Constructor? Need of Constructor? StringBuilder? etc.

Ans.

OOPs concepts are important for code reusability, maintainability, and scalability. Constructors are special methods used to initialize objects.

  • OOPs concepts help in creating modular, reusable, and maintainable code.

  • Inheritance, polymorphism, encapsulation, and abstraction are the four pillars of OOPs.

  • Constructors are special methods used to initialize objects with default or user-defined values.

  • StringBuilder is a class used to manipulate strings efficiently.

  • It is important t...read more

Q2. 1)What are the aggregade functions sql?

Ans.

Aggregate functions in SQL are used to perform calculations on a set of values and return a single value.

  • Common aggregate functions include COUNT, SUM, AVG, MIN, and MAX.

  • COUNT returns the number of rows that match a specified condition.

  • SUM calculates the sum of a column's values.

  • AVG calculates the average of a column's values.

  • MIN returns the minimum value in a column.

  • MAX returns the maximum value in a column.

  • Aggregate functions can be used with the GROUP BY clause to perform ...read more

Q3. Which is responsible for execute java program

Ans.

Java Virtual Machine (JVM) is responsible for executing Java programs.

  • JVM is a virtual machine that interprets compiled Java code.

  • It provides a runtime environment for Java programs to run.

  • JVM is platform-independent and provides memory management, security, and other features.

  • Java programs are compiled into bytecode, which is then executed by the JVM.

  • JVM is responsible for loading classes, verifying bytecode, and executing the program.

Q4. Why are not remove Servlet from Java technology

Ans.

Servlets are still relevant for web development in Java

  • Servlets provide a lightweight and efficient way to handle HTTP requests and responses

  • They can be used for dynamic web content generation and server-side processing

  • Servlets are extensible and can be integrated with other Java technologies like JSP and JDBC

  • Alternative technologies like Spring MVC and RESTful APIs build on top of Servlets

  • Removing Servlets would break backward compatibility and disrupt existing Java web appl...read more

Are these interview questions helpful?

Q5. In Bootstrap how many columns are there ?

Ans.

There are 12 columns in Bootstrap grid system.

  • Bootstrap grid system is divided into 12 columns.

  • Columns can be combined to create different layouts.

  • Example:

    will create a column that spans half of the row.

Q6. Is Java Interpreted or Compiler language ?

Ans.

Java is a compiled language that is first compiled into bytecode and then interpreted by the Java Virtual Machine (JVM).

  • Java is first compiled into bytecode by the Java compiler.

  • The bytecode is then interpreted by the Java Virtual Machine (JVM) at runtime.

  • This combination of compilation and interpretation makes Java a compiled language with some interpreted features.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. What is jdk,jre , thread , collection

Ans.

jdk is Java Development Kit, jre is Java Runtime Environment, thread is a unit of execution, collection is a group of objects.

  • JDK is a software development kit used to develop Java applications.

  • JRE is a runtime environment used to run Java applications.

  • Thread is a lightweight unit of execution within a process.

  • Collection is a group of objects that can be manipulated as a single unit.

Q8. What is constructor?

Ans.

A constructor is a special method that is used to initialize objects in Java.

  • Constructors have the same name as the class they belong to.

  • They are called automatically when an object is created.

  • They can take parameters to initialize the object's state.

  • If a class does not have a constructor, a default constructor is provided.

  • Constructors can be overloaded to provide multiple ways to initialize an object.

Frequently asked in, ,

Junior Java Developer Jobs

Junior Java Developer 4-6 years
Oracle
3.7
₹ 10 L/yr - ₹ 15 L/yr
Mumbai
Junior Java Developer 1-2 years
Anblicks Solutions
4.4
Ahmedabad
SutiSoft - Junior Java Developer - Spring Frameworks (0-2 yrs) 0-2 years
SutiSoft Pvt. Ltd
3.7
₹ 3 L/yr - ₹ 6 L/yr

Q9. Spring boot crud example

Ans.

Spring Boot CRUD example is a basic implementation of Create, Read, Update and Delete operations using Spring Boot framework.

  • Create a Spring Boot project with required dependencies

  • Define entity classes and their relationships

  • Create repository interfaces extending JpaRepository

  • Implement service classes with business logic

  • Create RESTful API endpoints using @RestController

  • Use HTTP methods to perform CRUD operations

  • Test the API using tools like Postman

Q10. How to call rest api's

Ans.

To call REST APIs, use HTTP methods like GET, POST, PUT, DELETE with the API endpoint URL.

  • Use a HTTP client library like Apache HttpClient or OkHttp

  • Pass any required parameters in the request body or as query parameters

  • Handle the response returned by the API

  • Add appropriate headers like Authorization or Content-Type if required

Q11. JDBC Connection steps

Ans.

JDBC Connection steps

  • Load the JDBC driver class

  • Establish a connection to the database using DriverManager.getConnection()

  • Create a statement object using the connection.createStatement() method

  • Execute the SQL query using statement.executeQuery() method

  • Process the ResultSet object returned by the query

  • Close the connection and statement objects using close() method

Q12. Write an Update Query

Ans.

Update query to modify data in a database table

  • Use UPDATE statement followed by table name

  • Set the column(s) to be updated using SET keyword

  • Specify the new values for the column(s) to be updated

  • Add WHERE clause to specify the condition for updating specific rows

Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.7
 • 5.2k Interviews
3.6
 • 3.6k Interviews
4.1
 • 2.3k Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Junior Java Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter