Showing posts with label Interviews. Show all posts
Showing posts with label Interviews. Show all posts

Tuesday, 29 August 2023

Akkodis Company Java Technical Lead Interview Questions (9–12 Years Experience)

       Below are the list of java technical lead interview questions asked in Akkodis during the firstround.

1) What are the features in java8 ?

2) Why introduced default method in java 8 ?

3) What is the use of static method in java 8 ?

4) What is functional interface in java8 ?

5) What is the use of flatMap in streams and explain with example

6) List<Integer> list = Arrays.asList(10, 23, 8, null);

Write a program to sort the list in ascending and descending order and remove the nulls --using streams

7) what is generics in java ? Is this supports polymorphism ? (Answer -- yes)
if yes then which polymorphism supports compile or runtime(Answer - runtime)  

8) How many ways to create thread ? which one prefer and why ?

9) What implemenation or changes done in HashMap in java 8 ?

10) Which scenario's to use ArrayList and LinkedList

11) Asked some Linux commands.

12) Explain contract between equals and hashcode method.

13) What are the intermediate functions in streams.

14) How to make ArrayList as final - as final is immutable.

15) How to create singleton object and how to restrict for clone and deserialization

16) How to handle global the exception in spring boot

17) What is checked and unchecked exception

18) How to set the priority thread in threads.

19) What is completable future in java 8.


Thank you for visiting the blog.

Monday, 21 August 2023

LTIMindtree Java technical Lead interview questions

       Below are the list of java technical lead interview questions asked in LTIMindtree during the first round.

1) Explain Saga design pattern used in Microservice(Answer)

2) What is orchestrator in Saga pattern?(Answer)

3) Which authentication mechanism used in project and how to implemented(AOuth2 with bearer token)?

3) What is the use of Eureka server?(Answer)

4) What is Functional interface in java 8? do we have default method in Functional interface(Answer)

5) Why introduced deafult method in interface in java 8?(Answer)

6) What is lambda expression ?(Answer)

7) What is difference between collection and stream?(Answer)

8) What is the use of status code in Rest API ?(Answer)

9) What is database/memory lock expeption?

10) What are HTTP idempotent methods?(Answer)

11) What are the key components in spring boot?

12) What is the use of @WebMvcTest . Difference between @WebMvcTest and @SpringBootTest(Answer)

13) Write a program to find second largest word in the sentence.

14) Write a query to find the max salary from the employee table whose name is Reta


Thank you for visiting blog.

Previous                                                   Home

Wednesday, 2 August 2023

mobtexting company Java Technical Lead Interview Questions

  Below are the list of java technical lead interview questions asked in mobtexting company.

1) 

List<String> list = new ArrayList<String>();
list.add("abc");
List<String> linkedList = new LinkedList<String>();
linkedList.add("abc");

list.get()     
linkedList.get(); 

In the above code, which one is faster, whether list.get or linkedList.get ?

Answer :- list.get is faster than linkedList. more details refer Time Complexity of Collection API

2) 
HashMap<String, String> map = new HashMap<String, String>();
map.put("a", "abc");
TreeMap<String, String> treeMap = new TreeMap<String, String>();
treeMap.put("a", "abc");

map.get("a");
treeMap.get("a");

Which one is faster HashMap or TreeMap retrieval ? (Answer)
and also explain the internal working of HashMap and TreeMap ?

3) 
public class Key{
   private String name,
   private String id;
   
   //constructir and Setters and getters
}

public class Main {
    
    public static void main(String[] args) {
   
         Map<Key, String> map = new HahsMap<Key, String>();
   
         Key a = new Key("XYZ", "123");
         Key b = new Key("XYZ", "234");
   
         map.put(a, "Value");
   
         map.get(b);
         map.get(a);
    }
}

What is the output for map.get code ?

4) What is dependency injection ? (Answer) What is diffrence between Spring MVC and Spring boot?(Spring)

5) What is difference between setter injection and constructor injection.(Answer)

6) What are the different ways to create bean ? (Answer)

7) Explain Spring bean scopes and Spring bean singleton is thread safe or not ?(Answer)

8) What are IOC containers in spring ?(Answer)

9) What is difference between Hibernate and JPA? can we use hibernate without JPA?

10) Explain JPA entity lifecycle/status.(Answer)

11) What is eager and lazy loading ? whats N+1 problem and solution(Answer)

12) Explain first level and second level caching in hibernate(Answer)

13) Explain ACID properties of transaction  (Answer)

14) SQL
create table person(
  id integer,
  name varchar,
  primary key(id)
);
 
create car_owner(
   person_id integer(it's primary key of person table),
   car_id integer (it's primary key of car table)
);

create table car(
  id integer,
  car_brand varchar,
  car_color varchar,
);
 
 Write a query to return car brand and car owner name for all the owners
 
 Answer :- 
SELECT p.name, c.brand FROM person p, car_owner co, car c 
 WHERE p.id = co.person_id AND 
       co.car_id = c.id
 
 Write a query to count the total cars for each color greater than 10.
 
 Answer
SELECT count(*), color FROM car 
group by color HAVING count(*) > 10;


Thank you for visiting the blog.

Tuesday, 25 July 2023

Publicis Sapient Java Technical Lead Interview Questions

      Below is the list of Java Technical Lead interview questions asked at Publicis Sapient during the second round.

1)  Time complexity for HashMap, LinkedHashMap, ArrayList, LinkedList, ConcurrentHashMap.(Answer)

2) Explain ReentrantLock in java (Answer)

3) What is thread pool and explain the executor framework.

4) Explain java 8 features(Answer)

5) What is difference between map and flatMap method in stream(Answer)

6) What is the difference between stream and parallel stream. Explain parallel stream performance.

7) What is association and aggregation in java(Answer)

8)  Explain Solid Design Principles(Answer)

9) Difference between SOA and Microservices (Answer)

10) Explain Design pattern used in Microservices mainly Circuit design pattern and Saga pattern(Answer)

11) How to communicate two microservices ? (Answer)

12) Difference between Kafka and RabitMQ(Answer)

13) Explain the scope of spring beans (Answer)

14) What is the use of spring actuator? (Answer)

15) Explain Spring security used in application(Answer)

16) Explain if you used any cahcing algorithm in application

17) Which annotations included in @SpringBootApplication (Answer)


Thank you for reading the blog.


Reference Posts:-