Synechron Interview Questions – Set 1
Synechron had arranged walk-in drive at Ahmedabad location for multiple opening at Mumbai, Pune and Bangalore location. I have appeared for Sr Java Developer position.
I got a call from Ethos HR consultancy and interview was scheduled at the office of Ethos HR, Ahmedabad. Arrangement by Ethos HR was very poor and unprofessional. However, interviewers were very friendly and good at interviewing.
There were total three rounds. Two technical and One HR round.
First Technical Round
Java
- Do you know about SOLID design principles? Explain.
-
What is the difference between
ArrayList
andLinkedList
? -
When will
ArrayList
be resized? What will be the size of newArrayList
? -
How
HashMap
works internally? ExplainhashCode()
andequals()
method? (Answer) -
How does
HashMap
calculate Bucket position, if returned HashCode of key is 35 and HashTable array size is just 16? -
Can we have multiple
null
values inHashMap
?
Answer : Yes. HashMap can have multiplenull
values and onenull
key. for more details you can check our article on HashMap Internals.
-
How does
HashSet
work internally? Which data structure it uses internally?
Answer :HashSet
internally usesHashMap
. Stores all the element asHashMap
key and value as static instance of classObject
.
– For detailed understanding, please read our article How is HashSet implemented internally in Java?
-
What is the difference between
HashMap
,ConcurrentHashMap
andSynchronizedMap
?
Answer :
-HashMap
is not thread-safe.
–SynchronizedMap
is a thread-safe, but it will acquire lock on entire Map in read and write opearations. So at a time only one thread can either read or write in Synchronized Map. Hence it is slower.–
ConcurrentHashMap
is a thread-safe. Instead of acquireing a lock on entire Map object, it devides map in different segements and each thread can aquire a lock on individual segment. so at a time multiple threads can write in different segments but not in the same segement. Also this lock is required only in write operation. Multiple threads can read concurrently from the same segement.–
HashMap
andSynchronizedMap
can have multiplenull
values and onenull
key whereasConcurrentHashMap
can not have anynull
keys or values.– For detailed understanding, please read our article Hashtable Vs SynchronizedMap Vs ConcurrentHashMap
- What is the difference between CountDownLatchand CyclicBarrier? (Answer)
- How to create Immutable object? What you will do if one of the field in your immutable class is mutable? (Answer)
Programming
-
Write down a program to implement your own iterator of
ArrayList
. - Find a cycle in a linked list.
- Find a first node of that cycle.
- Write a program to print 'Hello World' repeatadly using two threads. Thread 1 should print 'Hello' and Thread 2 should print 'World'
WebServices
-
Difference between
POST
andPUT
method. - Where have you used WebServices in your application?
Spring
- What are the scope of Spring Bean?
- What is the default scope of Spring Bean?
- What is prototype scope in Spring?
- Explain Spring MVC Execution Flow.
- Explain Spring Bean Life cycle.
-
Explain any one use case of Spring
BeanPostProcessor
. - Difference between auto wire by Type and auto wire by Name.
SQL
-
What is the use of
group by
andhaving
Clause? - Explain all types of joins in database.
- What is SQL Injection? Which feature of JDBC can we use to prevent SQL Injection?
- For below given SQL Table
Emp_Id | Employee_Name | Mgr_Id |
---|---|---|
100 | Prateek | – |
101 | Kapil | 100 |
102 | Prakash | 101 |
103 | Jack | 101 |
Write a query to fetch result as below
Employee_Name | Manager_Name |
---|---|
Prateek | – |
Kapil | Prateek |
Prakash | Kapil |
Jack | Kapil |
HR Round
After I clear first technical round, they have scheduled a HR discussion. They have asked me about various behavioural questions like
- Why are you looking for a Job change?
- Why do you want to relocate to Bangalore?
- Why do you want to join Synechron?
- Have you read reviews about Synechron?
- There were so many negative reviews about Synechron in Glassdoor. Why you still want to join Synechron?
- where do you see yourself in 5 years?
- What are the two things which you don't like about your current organization?
- If we will give you an good offer, and after that your current organization will also agree to give you a good salary hike. Will you join Synechron or will choose to serve in current Organization?
Second Technical Round (Telephonic)
After HR Round, they have scheduled one more technical telephonic round.
Java
- What all things will you take care, if you are using serialization?
-
What will happen, if I will not declare
SerialVersionUID
in a class which implementsSerializable
? - How have you used serialization in your project?
- What is the difference between Immutable object and Mutable Object?
- When you will use Immutable objects in your application?
- What is CyclicBarrier?
-
Have you ever used CyclicBarrierin your application? If Yes, what have you implemented using
CyclicBarrier
? -
Write a java function which accepts
Map
as input and outputs anotherMap
.
input Map : Map<Student,Marks>
output Map : Map<Student,Grades>
conditions for output Map :
1. Grades Calculation:
if marks > 90, then A Grade
if 80 < marks < 90, then B Grade
if 70 < marks < 80, then C Grade
if 60 < marks < 70, then D Grade
if 50 < marks < 60, then E Grade
2. Map should only contain Students having marks more than 50.
3. Map should be sorted based on Grades.
Spring
- What is the use of dispatcher servlet in Spring MVC.
SQL
- What all database constraint do you know?
- Is it possible to create Composite Unique Key? Or It can be created only on one table?
- Difference between clustered Index and Non clustered Index.
Hibernate
- What is First Level Caching in Hibernate?
-
How you will create
OneToMany
relationship in Hibernate? - What are the different state of Hibernate POJO?
- What is transient state?
- What is Cascade Attribute In Hibernate?
This article is contributed anonymously by one of the CodePumpkin user. If you would also like to contribute your article or share interview experiences, you can create contributor account with CodePumpkin by clicking here or you can send us a mail at admin@codepumpkin.com.
That's all for this topic. If you guys have any suggestions or queries, feel free to drop a comment. We would be happy to add that in our post. You can also contribute your articles by creating contributor account here.
Happy Learning 🙂
If you like the content on CodePumpkin and if you wish to do something for the community and the planet Earth, you can donate to our campaign for planting more trees at CodePumpkin Cauvery Calling Campaign.
We may not get time to plant a tree, but we can definitely donate ₹42 per Tree.
About the Author
Tags: ArrayList, Collection Framework, Collections, Concurrency, Core Java, DataStructure, HashMap, Java, Linkedlist, Multithreading, SinglyLinkedList, Synchronization
Comments and Queries
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:<pre><code class="java"> String foo = "bar"; </code></pre>For more information on supported HTML tags in disqus comment, click here.