Senior Java Developer Interview Questions in Washington, DC | Glassdoor

Find jobs for Senior Java Developer

Senior Java Developer Interview Questions in Washington, DC

"Senior developers have years of experience in Java and have the knowledge and communication skills to mentor other developers. Companies prioritize strong technical skills and questions will focus on problem solving and critical thinking. A bachelor's degree in computer science or a related field, along with years of industry experience are standard."

Top Interview Questions

Sort: RelevancePopular Date

Given an array of numbers, create another array of numbers. Calculate each new array number by multiplying all input array numbers, except for the current number position in the new array.

3 Answers

A O(2*N) = O(N) solution would include: 1. Get the product of all the numbers in the input array; 2. Set the ith number as the product, in step1, divided by the ith number in the input; Of course, the obvious solution would have complexity of O(n^2): get the new array ith number by getting the product of all the input numbers except for the ith position number.

Solution with O(N) public long[] multipliedArray(int[] arr){ long result[] = new long[arr.length]; long allMultiplication=1; for(int i=0;i

public static void main(String[] args) { int[] returnVal = multiplyArrayItems(new int[]{1,2,3,4,5}); System.out.println(String.join(",", Arrays.stream(returnVal).mapToObj(String::valueOf).toArray(String[]::new))); } static int[] multiplyArrayItemsSE(int[] arr){ int[] returnArr = new int[arr.length]; ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("js"); try { String[] sarr = Arrays.stream(arr).mapToObj(String::valueOf).toArray(String[]::new); int totalVal = (int) engine.eval[String.join("*", sarr)); for(int i = 0; i < arr.length; i++){ returnArr[i] = totalVal / arr[i]; } } catch (ScriptException e) { // TODO Auto-generated catch block e.printStackTrace(); } return returnArr; }

Java & Hibernate technical questions. Java- about String object instatntiation/representation in JVM. Hibernate- different caches..

1 Answer

Why applying for this company and skills that makes me the right candidate for the positon

Basic Java/J2EE questions. Questions from past project experience.

Mostly basic java questions. They mainly look if you can solve problems. Based on experience they will not ask the common questions but will ask conceptual to see problem solving skills for real world

The log parser Remove the tag from the HTML String provided Given an array of numbers, create another array of numbers. Calculate each new array number by multiplying all input array numbers, except for the current number position in the new array.

1 Answer

Tell me about a situation that you solved a technical problem with your ingenuity?

Some of the analytical and situational questions have multiple right answers where the panel is looking to understand the thought process employed in deriving your answer.