Java Senior Interview Questions

6,029 java senior interview questions shared by candidates

1st Round: Q1. Explain Vertical and Horizontal scaling. Q2. Given a sorted array and a number x, find the pair in the array whose sum is closest to x. Example: Input: array[]={-40,-5,1,3,6,7,8,20}; x=5; Output: The pair whose sum is closest to 5 is 1 and 3
avatar

Senior Java Developer

Interviewed at OpSec Security Group

2.5
Mar 11, 2025

1st Round: Q1. Explain Vertical and Horizontal scaling. Q2. Given a sorted array and a number x, find the pair in the array whose sum is closest to x. Example: Input: array[]={-40,-5,1,3,6,7,8,20}; x=5; Output: The pair whose sum is closest to 5 is 1 and 3

How would you ensure 2 different environments are initialized at startup using Spring Boot Optimize a method involving Spring boot. What are final, finally, and finalize? How would you write code that utilizes finally

Senior Java Engineer (Developer)

Interviewed at Transit Technologies

3.7
Mar 13, 2025

How would you ensure 2 different environments are initialized at startup using Spring Boot Optimize a method involving Spring boot. What are final, finally, and finalize? How would you write code that utilizes finally

Viewing 4171 - 4180 interview questions

Glassdoor has 6,029 interview questions and reports from Java senior interviews. Prepare for your interview. Get hired. Love your job.