Java Interview questions
- Which one is efficient
in terms of retrieval between TreeMap and HashMap
- What is an atomic operation
and synchronized in Java?
- We have ReST Service and multiple clients accessing it. How do you handle the count of calls to
ReST Service from these clients including concurrent calls
- We have Hive Tables -
Emp Table and Dept Table and a join query to get employee name and department name on join condition empId == deptId. Can you explain
internal execution of this hive query?
- Explain the mechanism of
Mapper Output related to Reducers Input.
- What is the default partitioner used in Spark?
- How to handle data skew and cleansing operations?
- Do you know about Spark
Execution Memory Model?
- Since you have 15+ yrs
of exp, what type of role are you looking at (Non-Technical)
- Which one is efficient
in terms of retrieval between TreeMap and HashMap
- Explain purpose of
Spring Profiles
- How do you find the middle node in a singly linked list without using any built-in functionality?
- When we try to place key-value pair with an already existing key into a hashmap, what happens? Explain the internal working of HashMap.
- HashMap already has an entry for (key1,10). If we try to place again with different value say
(key1,20). What would be a value returned for map? get(key1) and why?
- How do you store passwords in Java? Which is preferred - String or CharacterArray?
- What is JPA/Hibernate?
- Write SQL Query to find the maximum salary for a department given dept_id and salary fields in
department table
- What is the purpose of
ZooKeeper in Kafka Cluster?
- How is load balancing
achieved in Kafka while publishing messages to Kafka Brokers?
- In method overloading
with xyz(Object o) and xyz(String s), if we call XYZ(null), which the method gets called by the compiler and explain
- Explain what happens
when you execute the Springboot Application
Can Kafka be used without ZooKeeper?
- Explain purpose of
Spring Profiles
- I have 10 GB file and how do process in java?
- I have 10 files and want to run process these files in multithreading. how can you write code find the count of records processed at any given time?
- what are the different connection pooling properties? consider in the situation how can you or application handle that record needs to updated to the database but not getting connection due to network failure.
- i have two tables employee with empid, deptid, and department table with deptid, dept name and there are null values for deptid in the employee table. how you can write a query to retrieve all employee records with department name along with null dept id's
- how will you read and write 5GB big data files from one file location to another location with less memory 512mb in java?
- what are an atomic integer and its usage?
- How could we share the value between the multiple threads?
- what is the use of post construct method in spring
- Query to display emp id, dept id, and dept name if dept name is empty should display default department name from two tables employee and department
- What is cursor in pl SQL
- Any working knowledge of Hadoop and big data.
- Explain the current project functionality and architecture
- how to make run threads in sequence
- what use are Atomic Variables in thread
- what is the use of @autowired in spring what internally happens
- you have n number of threads how to run in sequence printing by each thread tell pseudo code
- spring design patterns and explain
- what are scopes in spring
- what is the singleton bean
- how to inject prototype bean into a singleton bean
- Explain the spring application context
- java 8 features and what is the use of Default method
- what is the difference between the SQL and NoSQL databases
- which scenario you use MongoDB and relational databases
- what is docker has written any docker images
- how fetch the data between the table write a query using joins with table records are given
- what use of NVLwhere it uses
- how to find out if your facing issue product environment
- angular and which version you used in developing applications and application flow
- Find the middle of the LinkedList in the collection using a double linked node method.
- What is the need to override the hashcode method in HashMap
- Spring - life cycle of Bean
- Multi-threading program - need to print the 1 to 100 based on the inputs like no of thread
- e.g - if no of a thread is 2 then, print the values like 123 from thread 1 and 456 from thread2.
- SQL - find the second max salary of every dept in an employee table
- e.g employee table - empid, empname, deptid, salary
- Hibernate eager loading and lazy loading difference
- Multithreading synchronization method and normal method difference
- Spring batch chunk () method use
- Spring batch partition () method use
- Multithreading four threads each thread is printing sequence numbers 1,2,3,4 and again same threads will continue the same, explain the step by step process.
- Get and load method difference in hibernate
- What are the design patterns available in Microservice that are utilized in this project? (Based on skillset added in specific profile)
- What are the important features of JavaSE 8?
- Explain Java Lambda Expressions and advantages?
- Java Stream API and map, reduce concepts in stream methods (Scenario-based)? (In an ArrayList of 10 elements, we need to add like (1*1 +2*2....10*10) and need to execute the output greater than 64?).
- How the Multi-threading is handled using executors?
- What are the design patterns that are used in Spring Framework?
- What are the high-level architecture and internal structure of Spring? (Not like, from the dispatcher to view mode).
- Explain IOC and its concepts used in Spring with advantages?
- Explain Spring AOP? (Scenario-based)?
- How to write the query for getting the results which are greater than 30% marks, For Ex? (We want to retrieve specific information from a table excluding other irrelevant data)
- How to list all rows in a table whose column values match a specified pattern? (Search capabilities of a SQL query.)
- Does the wild card search is case sensitive in SQL? (Extends from the Question 11, Similar)
- What is the ConcurrentHashMap in what it is different from Synchronized HashMap and HashMap
- What is HashSet and when we use it?
- When to use the ArrayList and LinkedList
- What is the significance of equals and hashcode...what if either of these methods is not overloaded
- What is Deadlock? Give an example or scenario. How to avoid the deadlocks
- If want to build the screen to fetch the data from DB, how many days you require
- What are the different classes we require to write for developing the screen
- What is the AOP and how to configure using an example
- What are Microservices and where you have used
- What are the design patterns used in Microservices
- How to configure OneToMany and ManyToOne mapping in hibernate
- What is eager and lazy in hibernate
- How to write the Joins, asked with an example scenario
- What is JDBCTemplate and what is the internal design pattern implementation used here
- What is the template method design pattern
- What is a strategy design pattern
- What is rowMapper and what is the internal design pattern used here
- What are the used Java 8 features?
- What is Lambda expression and how to define with an example
- Does Lambda requires the functional interface or without functional interface also Lambda can be used?
- What is the stream...How to use and what are the benefits...how to retrieve only odd a number from 1-100 using streams
- What is the life cycle of thread and methods involved in it
- How to print odd and even numbers sequentially using 2 threads
- What are the design patterns you know?
- What is the singleton design pattern?
- How will you write a design patten to maintain only two objects?
- What will you do to create a new object on every hit in Spring?
- Have you worked in Thread concepts?
- Brief about the last project?
- why are you going for Docker and open shift?
- Difference b/w stateful and stateless service?
- Explain all OOPs concepts with real-time example?
- What is Second level cache & first level cache?
- What is IOC?
- What is Linked HashSet and when to use?
- What is the purpose of the framework?
- What is the time complexity of HashMap for searching? What are the algorithm and data structure used for this?
- If two same data tables each having 3 rows...when performed an inner join, how many records it will fetch for you
- If two same data tables each having 3 rows...when performed cross join, how many records it will fetch for you
- Are you aware of Spring batch
- Are you aware of PL/SQL
- Explain how to print odd and even numbers sequentially using 2 threads
- Internal working of Hashmap and it's time complexities.
- Singleton design pattern and how to make it synchronized
- Print odd-even with two threads.
- How to create an immutable class.
- Query to select all the records of employees and only the matching records of the department.
- Query to select the max salary for every department.
Comments
Post a Comment