The Complete Project Source Code Platform

Kashipara.com is a community of ONE million programmers and students, Just like you, Helping each other.Join them. It only takes a minute: Sign Up

Buy a laptop for coding and programming Buy a programming books

latest java 1 Job Interview Questions And Answers


Why don't preparation your interviews. Best and top asking questions java 1 questions and answers. Prepare your job java 1 interview with us. Most frequently asked questions in java 1 interview. Top 10 most common java 1 interview questions and answer to ask. java 1 most popular interview question for fresher and experiences. We have good collection of java 1 job interview questions and answers. Ask interview questions and answers mnc company.employee ,fresher and student. java 1 technical questions asking in interview. Complete placement preparation for major companies tests and java 1 interviews,Aptitude questions and answers, technical, interview tips, practice tests, assessment tests and general knowledge questions and answers.


Free Download java 1 Questions And Answers Pdf.


latest java 1 FAQ java 1 Interview Questions and Answers for Experiences and Freshers.



What are some common problems you have faced in multi-threading environment? How did you resolve it?

Memory-interference, race conditions, deadlock, live lock and starvation are example of some problems comes in multi-threading and concurrent programming. There is no end of problem if you get it wrong and they will be hard to detect and debug.

java thread   jayvik 2014-04-14 09:34:51

What is immutable object? How does it help on writing concurrent application?

Another classic interview questions on multi-threading, not directly related to thread but indirectly helps a lot. This java interview question can become more tricky if ask you to write an immutable class or ask you Why String is immutable in Java as follow-up.

java thread   jayvik 2014-04-14 09:34:00

What is difference between CyclicBarriar and CountdownLatch in Java ?

One difference is that you can reuse CyclicBarrier once barrier is broken but you can not reuse ContdownLatch.

java thread   jayvik 2014-04-14 09:33:23

How will you awake a blocked thread in java?

This is tricky question on threading, blocking can result on many ways, if thread is blocked on IO then I don't think there is a way to interrupt the thread, let me know if there is any, on the other hand if thread is blocked due to result of calling wait(), sleep() or join() method you can interrupt the thread and it will awake by throwing InterruptedException. See my post How to deal with blocking methods in Java for more information on handling blocked thread.

java thread   jayvik 2014-04-14 09:32:41

Why we call start() method which in turns calls run() method, why not we directly call run() method ?

when you call start() method it creates new Thread and execute code declared in run() while directly calling run() method doesn’t create any new thread and execute code on same calling thread. Read my post Difference between start and run method in Thread for more details.


java thread   jayvik 2014-04-14 09:31:58

How will you take thread dump in Java? How will you analyze Thread dump?

In UNIX you can use kill -3 and then thread dump will print on log on windows you can use "CTRL+Break". Rather simple and focus thread interview question but can get tricky if he ask how you analyze it. Thread dump can be useful to analyze deadlock situations as well.

java thread   jayvik 2014-04-14 09:31:14

What is race condition? How will you find and solve race condition?

Another multi-threading question in Java which appear mostly on senior level interviews. Most interviewer grill on recent race condition you have faced and how did you solve it and some time they will write sample code and ask you detect race condition. See my post on Race condition in Java for more information. In my opinion this is one of the best java thread interview question and can really test the candidate's experience on solving race condition or writing code which is free of data race or any other race condition. Best book to get mastery of this topic is "Concurrency practices in Java'".

java thread   jayvik 2014-04-14 09:30:48

What is volatile keyword in Java? How to use it? How is it different from synchronized method in Java?

Thread questions based on volatile keyword in Java has become more popular after changes made on it on Java 5 and Java memory model. It’s good to prepare well about how volatile variables ensures visibility, ordering and consistency in concurrent environment.

java thread   jayvik 2014-04-14 09:30:21

What is atomic operation? What are atomic operations in Java?

Simple java thread interview questions, another follow-up is do you need to synchronized an atomic operation? :) You can read more about java synchronization here.

java thread   jayvik 2014-04-14 09:27:26

Write a program which will result in deadlock? How will you fix deadlock in Java?

Java thread interview questions and answers This is my favorite java thread interview question because even though deadlock is quite common while writing multi-threaded concurrent program many candidates not able to write deadlock free code and they simply struggle. Just ask them you have n resources and n thread and to complete an operation you require all resources. Here n can be replace with 2 for simplest case and higher number to make question more intimidating. see  How to avoid deadlock in java  for more information on deadlock in Java.

java thread   jayvik 2014-04-14 09:26:52

Write code to solve the Produce consumer problem in Java?

Similar to above questions on thread but more classic in nature, some time interviewer ask follow up questions How do you solve producer consumer problem in Java, well it can be solved in multiple way, I have shared one way to solve producer consumer problem using BlockingQueue in Java , so be prepare for surprises. Some time they even ask to implement solution of dining philosopher problem as well.

java thread   jayvik 2014-04-14 09:24:24

Write code to implement blocking queue in Java?

This is relatively tough java multi-threading interview question which servers many purpose, it checks whether candidate can actually write Java code using thread or not, it sees how good candidate is on understanding concurrent scenarios and you can ask lot of follow-up question based upon his code. If he uses wait() and notify() method to implement blocking queue, Once interviewee successfully writes it  you can ask him to write it again using new java 5 concurrent classes etc.

java thread   jayvik 2014-04-14 09:23:34

What are differences between wait and sleep method in java?

Only major difference is wait release the lock or monitor while sleep doesn't release any lock or monitor while waiting. Wait is used for inter-thread communication while sleep is used to introduce pause on execution. See my post wait vs sleep in Java for more differences

java thread   jayvik 2014-04-14 09:23:02

What is the advantage of new Lock interface over synchronized block in Java?

You need to implement a high performance cache which allows multiple reader but single writer to keep the integrity how will you implement it?

The major advantage of lock interfaces on multi-threaded and concurrent programming is they provide two separate lock for reading and writing which enables you to write high performance data structure like ConcurrentHashMap and conditional blocking. This java threads interview question is getting increasingly popular and more and more follow-up questions come based upon answer of interviewee. I would strongly suggest reading Locks before appearing for any java multi-threading interview because now days Its  heavily used to build cache for electronic trading system on client and exchange connectivity space.

java thread   jayvik 2014-04-14 09:19:33

What is the difference between ServletConfig and ServletContext?

ServletConfig as the name implies provide the information about configuration of a servlet which is defined inside the web.xml file or we can say deployment descriptor.its a specific object for each servlet.

ServletContext is application specific object which is shared by all the servlet belongs to one application in one JVM .this is single object which represent our application and all the servlet access application specific data using this object.servlet also use their method to communicate with container.

java servlet   jayvik 2014-04-09 08:54:34

what is servlet collaboration?

 communication between two servlet is called servlet collaboration which is achieved by 3 ways.
1. RequestDispatchers include () and forward() method .
2. Using sendRedirect()method of Response object.
3. Using servlet Context methods

java servlet   jayvik 2014-04-09 08:54:06

Why we need to implement Single Thread model in case of Servlet.

In J2EE we can implement our servlet on two different ways either by using:
1. Single Thread Model
2. Multithread Model
Depending upon our scenario, if we have implemented single thread means only one instance is going handle one request at a time no two thread will concurrently execute service method of servlet.
Example in banking account where sensitive data is handle mostly this scenario was used this interface is deprecated in Servlet API version 2.4.

As the name signifies multi thread means a servlet is capable to handle multiple requests at same time. This servlet interview question was quite popular few years back on entry level but now its loosing its shine.

java servlet   jayvik 2014-04-09 08:53:37

How can you get the information about one servlet context in another servlet?

In context object we can set the attribute which we want on another servlet and we can get that attribute using their name on another servlet.
Context.setAttribute (“name”,” value”)
Context.getAttribute (“name”)

java servlet   jayvik 2014-04-09 08:52:49

How can we refresh servlet on client and server side automatically?


On client side we can use Meta http refresh and server side we can use server push.

java servlet   jayvik 2014-04-09 08:52:09




latest java 1 questions and answers for experienced


java 1 best Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of java 1 Programming Language. here some questions that helpful for your interview. java 1 2024 job interview questions with answers. java 1 for employee and fresher. Here we present some more challenging practice java 1 interview questions and answers that were asked in a real interview for a java 1 developer position. These questions are really good to not just test your java 1 skills, but also your general development knowledge. java 1 programming learning. we hope this java 1 interview questions and answers would be useful for quick glance before going for any java 1 job interview.