Trainee developer
Trainee developer
Basics of Java
8. What are static variables and methods? When should you use them?
11. Explain the four pillars of OOP: encapsulation, inheritance, polymorphism, and abstraction.
Exception Handling
20. Can we have multiple catch blocks for a single try block? Explain.
Collections Framework
21. What are the main interfaces in the Java Collections Framework?
28. What is the difference between Thread class and Runnable interface?
31. How do you create a thread in Java? Which is better, Runnable or extending Thread?
Servlets
7. What are JSP directives? How is data shared between JSP pages?
8. What are JSP directives? Explain include and page.
9. Explain the difference between include directive and include action in JSP.
16. What is the role of a web server and an application server in Java EE?
Java 8 Features
1. Functional Programming:
2. Streams API:
o What are streams in Java 8? How are they different from collections?
3. Optional Class:
o What are the advantages of the new java.time package over java.util.Date?
1. Data Structures
1. Array:
2. Linked List:
▪ Explain the time complexity of bubble sort, selection sort, and quicksort.
16. What is the purpose of Hibernate, and how does it simplify database interaction?
SQL Questions
Basics of SQL
2. What are the different types of SQL commands (DDL, DML, DCL, TCL)?
7. Explain the different types of SQL joins (INNER, LEFT, RIGHT, FULL).
12.
1. Write a query to find duplicate records in a table.
2. Explain the difference between DELETE and TRUNCATE.
3. How do you write a subquery in SQL?
13.
Database Design
19. What are indexes in SQL? What is the difference between clustered and non-clustered
indexes?
20. What are views in SQL? How are they different from tables?
Behavioral/Scenario-Based Questions
2. Explain a time when you optimized an SQL query for better performance.
3. How would you handle a situation where your code is failing in production?
4. What steps would you take to troubleshoot a database connectivity issue in Java?
5. How would you approach designing a database schema for a library management system?
Sample Practical Questions
1. Java Coding:
2. SQL Query:
3. Data Structures:
Here’s an additional section focusing on Strings in Java for your interview questions:
1. Basics:
2. Common Operations:
o How can you concatenate two strings in Java? Which is more efficient: +, concat(), or
StringBuilder?
3. String Methods:
4. String Comparisons:
6. Advanced Concepts:
o Explain the difference between mutable and immutable objects with reference to
strings.
o How can you use Java 8 Streams to count the frequency of characters in a string?
o Write a program to filter and print strings with more than five characters from a list
using lambdas.
3. Optional:
These questions provide a mix of theory and hands-on tasks to assess a candidate’s understanding of
string operations and practical problem-solving skills.