Questions that most Java candidates answer wrongly
Carvia Tech | December 16, 2017 | 1 min read | 174 views
There are few questions for which I rarely find right answer from the interview Candidates, here is the list ..
-
Is it required to synchronize the accessor of a shared mutable object in case of multi-threading? And why?
-
In which scenario StringBuilder should be preferred over String class?
-
I am working on an application where millions of temporary StringBuilder objects are being created, due to which app is facing large GC pauses, how would you rectify the problem, assuming that memory available can not be increased to great extent.
-
How Atomic updates are different from their synchronized counterpart?
-
When do we get the ConcurrentModificationException? What constitutes the structural modifications in a collection?
-
Is it possible to write a method in Java which can swap two int variable? What if we change the type from int to Integer?
-
What is difference between Class and the Instance level locking?
-
Can you prove a scenario where thread starvation occurs?
-
Is it a mandate to make all fields final inside a immutable class? If yes, why?
-
How to fix Double Check Locking (DCL multi-threading singleton problem)?
-
What is Java Memory Model ? Who should read it?
-
What is upper bound and lower bound in generics?
-
What happens when an exception is thrown from a try block which has no catch clause. But in finally block, a value is returned by the method? Discuss the scenario.
Top articles in this category:
- Sapient Global Market Java Interview Questions and Coding Exercise
- Goldman Sachs Java Interview Questions
- UBS Java Interview Questions
- Morgan Stanley Java Interview Questions
- Citibank Java developer interview questions
- RBS Java Programming Interview Questions
- ION Trading Java Interview Questions
Find more on this topic:
Subscribe to Interview Questions
Recommended books for interview preparation:
Similar Posts
- Finastra Investment Banking Interview Questions
- Merge two sorted array into a single sorted array
- Spring Boot with GMAIL SMTP
- Mandrill emails in Spring Boot Java
- Hibernate & Spring Data JPA interview questions
- Generating cryptographically strong key/secret in Java
- Reverse the bits of a number and check if the number is palindrome or not
- MD5 and SHA256 in Java Kotlin and Android
- There is no PasswordEncoder mapped for the id
- Inter-thread communication in Java