Here’s a list of basic one-liner questions and answers that HR might ask in a first screening
interview:
Java:
1. What is Java? → Java is a high-level, object-oriented programming language.
2. What is the latest version of Java? → (Mention the latest stable version).
3. Is Java platform-independent? → Yes, because of the JVM (Java Virtual Machine).
4. What is OOP? → Object-Oriented Programming is a paradigm based on objects and
classes.
5. What is the difference between JDK, JRE, and JVM? → JDK includes JRE and
development tools; JRE runs Java applications; JVM executes Java bytecode.
Spring Boot:
6. What is Spring Boot? → A framework to build stand-alone, production-ready Spring
applications.
7. Why is Spring Boot popular? → It simplifies Java application development with auto-
configuration and embedded servers.
8. What is dependency injection? → A design pattern that manages object dependencies
automatically.
9. What is an embedded server in Spring Boot? → A built-in server like Tomcat, Jetty, or
Undertow to run applications without external deployment.
10. What is the default embedded server in Spring Boot? → Tomcat.
Microservices:
11. What are microservices? → A software architecture where applications are built as a
collection of small, independent services.
12. Why are microservices used? → For scalability, flexibility, and faster deployment.
13. What is an API Gateway? → A single entry point for managing requests in a
microservices architecture.
14. How do microservices communicate? → Using REST, gRPC, or messaging queues like
Kafka.
15. What is service discovery? → A mechanism to locate services dynamically, often using
tools like Eureka.
GraphQL:
16. What is GraphQL? → A query language for APIs that allows clients to request only the
data they need.
17. How is GraphQL different from REST? → GraphQL allows flexible queries, whereas
REST relies on fixed endpoints.
18. What are the key components of GraphQL? → Query, Mutation, and Subscription.
Cisco Confidential
19. What is a resolver in GraphQL? → A function that fetches data for a GraphQL query.
20. What is a GraphQL schema? → A blueprint that defines the structure of GraphQL
queries and responses.
MongoDB:
21. What is MongoDB? → A NoSQL database that stores data in JSON-like documents.
22. Is MongoDB relational or non-relational? → Non-relational (NoSQL).
23. What is a collection in MongoDB? → A group of MongoDB documents, similar to a table
in relational databases.
24. What is an index in MongoDB? → A data structure that improves query performance.
25. What is the primary advantage of MongoDB? → High scalability and flexibility in
handling unstructured data.
Here are more questions & answers:
Java:
1. What are Java’s main features? → Object-oriented, platform-independent, secure,
robust, multithreaded.
2. What is the main method in Java? → public static void main(String[] args) is the entry
point of a Java program.
3. What is the difference between Java and JavaScript? → Java is a programming
language; JavaScript is a scripting language for web development.
4. What is JVM? → Java Virtual Machine, which runs Java bytecode on any OS.
5. What is the difference between equals() and == in Java? → equals() compares values,
== compares object references.
6. What is a constructor? → A special method used to initialize objects.
7. What is garbage collection in Java? → Automatic memory management by removing
unused objects.
8. What is multithreading? → Running multiple threads (tasks) concurrently for better
performance.
9. What is an interface in Java? → A blueprint of a class with abstract methods.
10. What is the difference between ArrayList and LinkedList? → ArrayList is faster for
retrieval; LinkedList is better for insertions/deletions.
Spring Boot:
11. What is the main advantage of Spring Boot? → Reduces boilerplate code with auto-
configuration.
Cisco Confidential
12. What is a Spring Boot starter? → A dependency that simplifies project setup, like
spring-boot-starter-web.
13. What is Spring Boot’s default logging framework? → SLF4J with Logback.
14. What is an actuator in Spring Boot? → A tool to monitor and manage applications.
15. What is a Spring Boot profile? → A way to manage different configurations for
environments like dev, test, prod.
16. What is @RestController in Spring Boot? → A combination of @Controller and
@ResponseBody to create REST APIs.
17. What is the purpose of @Service in Spring Boot? → Marks a class as a business
service layer.
18. What is @Autowired? → A way to inject dependencies automatically.
19. How do you handle exceptions in Spring Boot? → Using @ExceptionHandler or
@ControllerAdvice.
20. What is Spring Security? → A module to handle authentication and authorization in
Spring applications.
Microservices:
21. What are the advantages of microservices? → Scalability, flexibility, independent
deployment.
22. What is the difference between monolithic and microservices architecture? →
Monolithic is a single unit; microservices are small, independent services.
23. What is REST API? → A way to communicate between services using HTTP methods like
GET, POST.
24. What is inter-service communication in microservices? → Communication between
services using REST, gRPC, or messaging (Kafka, RabbitMQ).
25. What is circuit breaker in microservices? → A design pattern to handle failures and
prevent cascading failures (e.g., using Resilience4j).
26. What is Eureka in microservices? → A service discovery tool in the Spring Cloud
ecosystem.
27. What is Hystrix? → A library for fault tolerance in microservices (now replaced by
Resilience4j).
28. What is an API Gateway? → A single entry point for requests, handling authentication,
rate limiting, etc.
29. What is containerization in microservices? → Packaging an application and its
dependencies into a container (e.g., Docker).
30. What is Kubernetes? → A container orchestration tool for deploying and managing
microservices.
Cisco Confidential
GraphQL:
31. Why use GraphQL instead of REST? → GraphQL allows fetching only required data,
reducing over-fetching and under-fetching.
32. What is a GraphQL Query? → A request to fetch specific data from a server.
33. What is a GraphQL Mutation? → A request to modify (create, update, delete) data.
34. What is a GraphQL Subscription? → A real-time update mechanism in GraphQL.
35. What is a GraphQL Resolver? → A function that processes GraphQL queries and
retrieves the requested data.
36. What is introspection in GraphQL? → A feature that allows querying the schema itself.
37. Does GraphQL use HTTP? → Yes, it usually works over HTTP but can also use
WebSockets for subscriptions.
38. Can GraphQL replace REST APIs? → Not always; it depends on the use case.
39. What is Apollo GraphQL? → A popular client and server framework for GraphQL.
40. What is Relay in GraphQL? → A JavaScript framework that works with GraphQL to
manage data fetching.
MongoDB:
41. Is MongoDB SQL or NoSQL? → NoSQL.
42. What is BSON in MongoDB? → A binary format for storing JSON-like documents.
43. What is a primary key in MongoDB? → _id is the default primary key in MongoDB.
44. What is sharding in MongoDB? → Distributing data across multiple servers for
scalability.
45. What is replication in MongoDB? → Copying data across multiple servers to ensure
high availability.
46. How do you query data in MongoDB? → Using methods like find(), findOne(), and
aggregation pipelines.
47. What is an aggregation pipeline? → A framework for data transformation and analysis in
MongoDB.
48. What is MongoDB Atlas? → A cloud-based managed MongoDB service.
49. How does MongoDB handle transactions? → It supports multi-document ACID
transactions since version 4.0.
50. What is indexing in MongoDB? → A way to improve query performance by creating
indexes on fields.
Cisco Confidential
Cisco Confidential