Java Interview Questions
- 0of 0 votes
AnswersWrite a chunk of code in Java which shows an example of deadlock.
- dynamic June 29, 2010| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer Java - 0of 0 votes
AnswersExplain the difference between StringBuffer and StringBuilder. Why would you use each?
- Sal June 22, 2010| Report Duplicate | Flag | PURGE
Samsung Software Engineer / Developer Java - 0of 0 votes
AnswersExplain the difference between Shallow Copy and Deep Copy.
- Sal June 22, 2010| Report Duplicate | Flag | PURGE
Samsung Software Engineer / Developer Java - 1of 1 vote
AnswersYou have been asked to deploy a number of robotic domestic helpers (RDH) into a large room to remotely clean it as they move around it. This room is currently rectangular in shape and must be navigated by the RDH’s in order to successfully clean the room.
- Raj Kashyap May 24, 2010
A RDH position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The room is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the RDH is in the bottom left corner and facing North.
In order to control a RDH the operator sends a simple string of letters. The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the robot spin 90 degrees left or right respectively, without moving from its current spot. 'M' means move forward one grid point, and maintain the same heading.
Assume that the square directly North from (x, y) is (x, y+1).
INPUT:
The first line of input is the upper-right coordinates of the arena, the lower-left coordinates are assumed to be 0,0.
The rest of the input is information pertaining to the RDH’s that have been deployed. Each RDH has two lines of input. The first line gives the RDH’s initial deployed position, and the second line is a series of instructions telling the RDH how to navigate around the room.
The position is made up of two integers and a letter separated by spaces, corresponding to the x and y co-ordinates and the RDH’s orientation.
Each RDH will be finished sequentially, which means that the second RDH won't start to move until the first one has finished moving.
OUTPUT
The output for each RDH should be its final co-ordinates and heading.
INPUT AND OUTPUT
Test Input:
7 6
2 4 E
MMRMMRMRRM
3 4 N
LMLMLMLMM
Expected Output:
4 2 E
43e3 5 N| Report Duplicate | Flag | PURGE
Testing / Quality Assurance Java - 0of 0 votes
AnswersGiven a sorted array of n integers that has been rotated left or right by k places, give an algorithm that searches and finds an element in the array in log n time.
- Tee May 23, 2010
Example Input: 8 9 0 1 2 4 5 6 (sorted array rotated right by 2 places)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Arrays Java - 0of 0 votes
AnswersWhat are features of optimum Java code.
- RanTexas April 12, 2010| Report Duplicate | Flag | PURGE
Akamai Software Engineer / Developer Java - 0of 0 votes
AnswersExplain what is in a deployment descriptor file? give an example of a deployment descriptor
- nobody March 31, 2010| Report Duplicate | Flag | PURGE
USAA Software Engineer / Developer Java - 0of 0 votes
AnswersExplain what is defined in the .jar, .ear, and .web files for a J2EE application?
- nobody March 31, 2010| Report Duplicate | Flag | PURGE
USAA Software Engineer / Developer Java - 0of 0 votes
AnswersShare knowledge about JVM parameters/variables.
- cuppanomics March 30, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersHow do you get the request URL in a servlet?
- biggied88 March 14, 2010| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
Answerswhat will happen if you do not use hashcode() to override a equals()?
- biggied88 March 14, 2010| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswersWhat is the difference between >> and >>>?
- Anonymous March 11, 2010| Report Duplicate | Flag | PURGE
Adobe Java - 0of 0 votes
AnswersWhat is transient variable?
- Anonymous March 11, 2010| Report Duplicate | Flag | PURGE
Adobe Java - 0of 0 votes
AnswersWhy would you use the JSPs and JavaBeans in a web application?
- Anonymous March 11, 2010| Report Duplicate | Flag | PURGE
Adobe Java - 0of 0 votes
AnswersWhat is the purpose of the session() in a servlet?
- biggied88 March 08, 2010| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswersCan you have mutliple instances of a database running in hibernate?
- biggied88 March 08, 2010| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
Answerswhat is the great advantage of using hibernate(or any ORM) vs. direct peristence
- biggied88 March 04, 2010| Report Duplicate | Flag | PURGE
Home Depot Software Engineer / Developer Java - 0of 0 votes
AnswersExplain the different types of EJBs
- biggied88 March 04, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Java - 0of 0 votes
AnswersImplement a Singleton
- bizz March 04, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswerCan you identify 10 different Java APIs and explain what each is used for
- biggied88 March 03, 2010| Report Duplicate | Flag | PURGE
Home Depot Software Engineer / Developer Java - 0of 0 votes
AnswersInterview for a mid-level java developer on one of their product R&D teams:
- biggied88 March 03, 2010
Can you explain the use of web application frameworks in java development. Discuss, how they work, why they are used, what they have done to revolutionize java development in the last few years. Can you explain the difference between Spring and Struts. Can you explain the similarity between the two.| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Java - 0of 0 votes
AnswersHow does the Collections API handle collisions? How does the API handling making the collection "some-what" collision safe?
- biggied88 March 03, 2010
Explain- which collection does this affect and the best way to deal with it.
Also explain, the most common senario that causes this issue- hint* one is in threading(how can this be caused).| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java