Java Lead Interview Questions

12,714 java lead interview questions shared by candidates

- Method Overriding vs Method Overloading? - Can you override the main method in Java? - How do we prevent a method from being overriden? - What does static keyword do in Java? - What is a Singleton class in Java? How do we implement it? - Static methods vs non-static methods in Java? - Difference between String, StringBuilder, StringBuffer? - Difference between Interface & Abstract Classes? - HashSet vs Treeset? - HashMap vs HashTable? - What is the Hibernate Framework in Java? - throw vs throws keywords in java? - Constructor vs regular method? - What is Inheritance? - Types of Inheritance in Java? - What happens if static modifier is not included in the main method? - Can we make the main thread a daemon thread? - What happens if we have multiple main methods in the same class in Java? - Is it mandatory for a catch block to be after a try block in Java? - Different Unit testing types? - Best practices to follow when conducting unit-testing? - Different approaches, strategies that should be followed when writing strong unit-test cases? - How many phases of unit-testing are there? - What percent of coverage do we want to shoot for unit testing? - SQL - what is stored procedure and how do we get a stored procedure? - SQL - what are triggers? What are different kinds of triggers? - SQL - What are indexes, clusters, and non-clustered indexes? - SQL - What is the difference between a base and derived relations? - SQL - Difference between RDBMS and a normal database? (ex: mySQL vs SQL) - How does React.js work? - How is react different from react-native? - What is the difference between Virtual DOM and real DOM? - How do we create Forms in React.js? what is their use case? - Docker Experience? - Kubernetes experience? - Orchestration? My 2 LC easy questions were: - Implement a sorting algorithm for an integer array without using a built in sort-method in Java. - Reverse a String without using StringBuffer or StringBuilder in Java.
avatar

Full Stack Java Developer

Interviewed at Ascendion

3.8
Nov 21, 2023

- Method Overriding vs Method Overloading? - Can you override the main method in Java? - How do we prevent a method from being overriden? - What does static keyword do in Java? - What is a Singleton class in Java? How do we implement it? - Static methods vs non-static methods in Java? - Difference between String, StringBuilder, StringBuffer? - Difference between Interface & Abstract Classes? - HashSet vs Treeset? - HashMap vs HashTable? - What is the Hibernate Framework in Java? - throw vs throws keywords in java? - Constructor vs regular method? - What is Inheritance? - Types of Inheritance in Java? - What happens if static modifier is not included in the main method? - Can we make the main thread a daemon thread? - What happens if we have multiple main methods in the same class in Java? - Is it mandatory for a catch block to be after a try block in Java? - Different Unit testing types? - Best practices to follow when conducting unit-testing? - Different approaches, strategies that should be followed when writing strong unit-test cases? - How many phases of unit-testing are there? - What percent of coverage do we want to shoot for unit testing? - SQL - what is stored procedure and how do we get a stored procedure? - SQL - what are triggers? What are different kinds of triggers? - SQL - What are indexes, clusters, and non-clustered indexes? - SQL - What is the difference between a base and derived relations? - SQL - Difference between RDBMS and a normal database? (ex: mySQL vs SQL) - How does React.js work? - How is react different from react-native? - What is the difference between Virtual DOM and real DOM? - How do we create Forms in React.js? what is their use case? - Docker Experience? - Kubernetes experience? - Orchestration? My 2 LC easy questions were: - Implement a sorting algorithm for an integer array without using a built in sort-method in Java. - Reverse a String without using StringBuffer or StringBuilder in Java.

1). Difference between ArrayList and LinkedList? 2). What is Map? 3). What is Vector? 4). Difference between Overloading and Overriding? 5). Can possible to create Object for Parent class with child class reference? ex: Class A{ //Statements } Class B extends A{ //Statements PSVM(){ B Reference_Variable=new A(); } } 6). What is Synchronization? 7). what is the time complexity of Arraylist and Linked List? 8). Write a program to print the higher version of a Value? Ex: Value1=7.3.4.2.5.9 Value2=7.3.2.3.8.1 o/p: 7.3.4.2.5.9 in these 2 values write a program to print the Higher Version? 9). Test case: "Hai i am SAP" O/P: "iaH i ma PAS" write a program in java for above O/P? 10). About Project? 11). Flow of execution of a project with Architecture? 12).Basic SQL Questions? (DDL DML TCl Commands) 13). About Agile/Driven Methodology? 14). What is final keyword? 15) what is Data hiding? 16) Design patterns? (Singleton Design Pattern program) 17). Internal implementation of HashSet?
avatar

Java Developer

Interviewed at SAP

4.2
Jan 30, 2017

1). Difference between ArrayList and LinkedList? 2). What is Map? 3). What is Vector? 4). Difference between Overloading and Overriding? 5). Can possible to create Object for Parent class with child class reference? ex: Class A{ //Statements } Class B extends A{ //Statements PSVM(){ B Reference_Variable=new A(); } } 6). What is Synchronization? 7). what is the time complexity of Arraylist and Linked List? 8). Write a program to print the higher version of a Value? Ex: Value1=7.3.4.2.5.9 Value2=7.3.2.3.8.1 o/p: 7.3.4.2.5.9 in these 2 values write a program to print the Higher Version? 9). Test case: "Hai i am SAP" O/P: "iaH i ma PAS" write a program in java for above O/P? 10). About Project? 11). Flow of execution of a project with Architecture? 12).Basic SQL Questions? (DDL DML TCl Commands) 13). About Agile/Driven Methodology? 14). What is final keyword? 15) what is Data hiding? 16) Design patterns? (Singleton Design Pattern program) 17). Internal implementation of HashSet?

Viewing 6261 - 6270 interview questions

Glassdoor has 12,714 interview questions and reports from Java lead interviews. Prepare for your interview. Get hired. Love your job.