Java Developer Interview Questions in Jersey City, NJ | Glassdoor

# Java Developer Interview Questions in Jersey City, NJ

"Junior developers are often responsible for writing the more monotonous and simple code required by senior members of the development team. Because of this, interviews will be designed to test your knowledge of the fundamentals of Java so be prepared to answer technical questions that you likely came across in college. Data structures and algorithms will be heavily emphasised. A bachelor's degree or equivalent work experience is required. "

## Top Interview Questions

Sort: RelevancePopular Date

### Java Developer at Knight Capital was asked...

May 12, 2010
 Given an array of N integers, find the missing integer.3 AnswersIterate through array, keeping a sum of the values. Subtract the final answer from n*(n-1)/2the answer is subtract the sum from n*(n+1)/2Is that a well-known algorithm? I don't know how you could ever have figured that out. I would have sorted the array and iterated until I got to the missing integer.

### Java Developer at Goldman Sachs was asked...

May 10, 2011
 Fibonacci implementation3 AnswersI got the same f-ing question todayChetan Trikha is a no gooder vice president of Goldman, who has learnt fibonnaci in school and has never used it, and is asking candidates to implement it, whereas nobody can on the fly.//Fibonacci Sequence Generation using Recrusion Ex. /* Fib(0) is 0 [base case] * Fib(1) is 1 [base case] * For all integers n > 1: Fib(n) is (Fib(n-1) + Fib(n-2)) [Recursive definition] */ public int GenerateFibonacci(int count) { if (count <= 1) return 1; else return GenerateFibonacci(count - 1) + GenerateFibonacci(count - 2); }

### Java Developer at Goldman Sachs was asked...

May 19, 2010
 how to find square root of integer3 Answersbinary searchNewton's Method: http://en.wikipedia.org/wiki/Newton's_method#Square_root_of_a_numberdouble answer = java.Math.sqrt( ); You could use some other method. but that would be doing it wrong.

### Java Developer at Goldman Sachs was asked...

May 19, 2010
 why C++ deconstructor defined as virtual2 Answersmy C++ experience was 7/8 years ago, I could not answer this questionsDestructors must be virtual in C++ to make sure the whole object is deleted, not just the part of the object that the pointer type points to.

Jul 12, 2011
 If you pass null object to a method like simpleMethod(null) what would happen. simpleMethod is overridden like simpleMethod(String str) and simpleMethod(Date d)2 AnswersCompiler can not resolve the overridden method since both of the method can have "null" as the parameter. It message is "simpleMethod method is ambigous".That will work because null is object and it will consider as string or date as arg

### Java Developer at Cavalier IT was asked...

Oct 28, 2014
 You only have 1 year of experience, but 0 in Java. Are you willing to lie on your resume and say you have 4 years of experience so that our clients will hire you?1 AnswerI said "no", and she said "that will be all. Good luck in your job search". Clients beware. You're getting lied to by Cavalier IT

### Java Developer at Mercury Systems (New Jersey) was asked...

Aug 15, 2018
 What is inheritance?Be the first to answer this question

### Java Developer at Mercury Systems (New Jersey) was asked...

Jul 17, 2017
 it is about finding a primeBe the first to answer this question

### Java Developer at Knight Capital was asked...

Oct 30, 2011
 What are the differences with Java and C, OO and structural programming.Be the first to answer this question

### Entry Level Java Developer at Peri Software Solution was asked...

Aug 8, 2013
 probably, explaining them my school career, it was the longest answer needed question.Be the first to answer this question
110 of 44 Interview Questions