Senior Developer Java Interview Questions

5,288 senior developer java interview questions shared by candidates

Question 1: Given two sorted arrays, the task is to merge them in a sorted manner. Input: arr1[] = { 1, 3, 4, 5}, arr2[] = {2, 4, 6, 8} Output: arr3[] = {1, 2, 3, 4, 4, 5, 6, 8} Input: arr1[] = { 5, 8, 9}, arr2[] = {4, 7, 8} Output: arr3[] = {4, 5, 7, 8, 8, 9} Question 2 : Object[] array = { 1, 2, new Object[]{ 3, 4, new Object[]{ 5 }, 6, 7 }, 8, 9, 10, new Object[]{ 11,12} }; Integer[] flattenedArray = flatten(array); complete flatten array function to get the output array as [1,2,3,4,5,6,7,8,9]
avatar

Senior Java Developer

Interviewed at Wissen Infotech

3.8
Jan 9, 2025

Question 1: Given two sorted arrays, the task is to merge them in a sorted manner. Input: arr1[] = { 1, 3, 4, 5}, arr2[] = {2, 4, 6, 8} Output: arr3[] = {1, 2, 3, 4, 4, 5, 6, 8} Input: arr1[] = { 5, 8, 9}, arr2[] = {4, 7, 8} Output: arr3[] = {4, 5, 7, 8, 8, 9} Question 2 : Object[] array = { 1, 2, new Object[]{ 3, 4, new Object[]{ 5 }, 6, 7 }, 8, 9, 10, new Object[]{ 11,12} }; Integer[] flattenedArray = flatten(array); complete flatten array function to get the output array as [1,2,3,4,5,6,7,8,9]

Viewing 4141 - 4150 interview questions

Glassdoor has 5,288 interview questions and reports from Senior developer java interviews. Prepare for your interview. Get hired. Love your job.