Java Developer Production Support Interview Questions

26,897 java developer production support interview questions shared by candidates

You have an array of int with different numbers. You have to sort it in a way that the all the even numbers should come in the starting and odd numbers in the end. You cannot use a temp array or extra array in your solution.
avatar

Java Developer

Interviewed at Morgan Stanley

3.9
Nov 27, 2016

You have an array of int with different numbers. You have to sort it in a way that the all the even numbers should come in the starting and odd numbers in the end. You cannot use a temp array or extra array in your solution.

1. Please consider the HTML below. Assuming it is stored in a String variable, can you write a short Java program to retrieve all the ‘beverages’ from the list shown below. You should assume there could be any number of lists, with any number of items, and in any order, but there will only be one list of beverages. <html> <body> <p>Coders favourite music genre:</p> <ol> <li>House</li> <li>Ballad</li> <li>Dance</li> </ol> <p>Coders favourite beverage:</p> <ol> <li>Coffee</li> ................................................................................ <li>Tea</li> <li>Coke</li> </ol> <p>Coders favourite phrase:</p> <ol> <li>Pfff</li> <li>Damn</li> <li>It works</li> </ol> </body> </html> Consider the following HTML source of the page ‘test.html’ below: <html> <form name="sample" action=”?”> <input type="checkbox" name="field1" /> <input type="hidden" name="field2" id="field_2" /> <input type="radio" name="field3" value="X" /> <input type="radio" name="field3" value="Y" /> <input type="button" oncl1ck="document.getElementById('sample').submit();" value="Submit form" /> <input type=”submit” name=”clicked” value=”Click me” /> </form> </html> 2-Looking at the form above, to which page will the data be sent ? 3-What would be the HTTP method through which the form data will be transmitted ? 4-What will be the value of the checkbox ‘field1’, if the form was submitted as it is ? Hint: the checkbox that is not ticked. 5-What would be the result of clicking the ‘Submit form’ button ? Hint: see the bolded text above, before answering this question.
avatar

Java Developer

Interviewed at Travelfusion

3.3
Feb 17, 2015

1. Please consider the HTML below. Assuming it is stored in a String variable, can you write a short Java program to retrieve all the ‘beverages’ from the list shown below. You should assume there could be any number of lists, with any number of items, and in any order, but there will only be one list of beverages. <html> <body> <p>Coders favourite music genre:</p> <ol> <li>House</li> <li>Ballad</li> <li>Dance</li> </ol> <p>Coders favourite beverage:</p> <ol> <li>Coffee</li> ................................................................................ <li>Tea</li> <li>Coke</li> </ol> <p>Coders favourite phrase:</p> <ol> <li>Pfff</li> <li>Damn</li> <li>It works</li> </ol> </body> </html> Consider the following HTML source of the page ‘test.html’ below: <html> <form name="sample" action=”?”> <input type="checkbox" name="field1" /> <input type="hidden" name="field2" id="field_2" /> <input type="radio" name="field3" value="X" /> <input type="radio" name="field3" value="Y" /> <input type="button" oncl1ck="document.getElementById('sample').submit();" value="Submit form" /> <input type=”submit” name=”clicked” value=”Click me” /> </form> </html> 2-Looking at the form above, to which page will the data be sent ? 3-What would be the HTTP method through which the form data will be transmitted ? 4-What will be the value of the checkbox ‘field1’, if the form was submitted as it is ? Hint: the checkbox that is not ticked. 5-What would be the result of clicking the ‘Submit form’ button ? Hint: see the bolded text above, before answering this question.

Viewing 271 - 280 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 26,897 interview questions and reports from Java developer production support interviews. Prepare for your interview. Get hired. Love your job.