Java Trainee Interview Questions

30,904 java trainee interview questions shared by candidates

1. What is the method not stopping thread flow?{read(),wait(),notify() these are the options} 2. Program output public class BolleanLocalVariable { public void test(){ boolean b1=true; boolean b2=fix(b1); System.out.println(b1+" "+b2); } public boolean fix(boolean b1) { // TODO Auto-generated method stub b1=false; return b1; } public static void main(String[] args) { // TODO Auto-generated method stub BolleanLocalVariable B= new BolleanLocalVariable(); B.test(); } } 3. Program output public static void main(String[] args) { // TODO Auto-generated method stub int[] a= {3,5,8}; a[1]=7; int[] b=a; System.out.println(a[0]+" "+a[1]+" "+a[2]); System.out.println(b[0]+" "+b[1]+" "+b[2]); } 4.Program output public class FinallyWithSExitDemo { public static void main(String[] args) { // TO DO Auto-generated method stub try{ System.exit(0); }finally{ System.out.println("Hi i am in finally block"); } } } 5. Valid Thread class constructors 6. 7. Longest sub range of pure number 8. Length of unique K elements First Line T Test case Second N,K Elements separated by space Third line N elements with in the range of k 9. Find nth value of provided Palindrome list with the combination of 4 and 5 like 44,55,4545
avatar

Java Developer

Interviewed at DBS Bank

3.8
Feb 1, 2019

1. What is the method not stopping thread flow?{read(),wait(),notify() these are the options} 2. Program output public class BolleanLocalVariable { public void test(){ boolean b1=true; boolean b2=fix(b1); System.out.println(b1+" "+b2); } public boolean fix(boolean b1) { // TODO Auto-generated method stub b1=false; return b1; } public static void main(String[] args) { // TODO Auto-generated method stub BolleanLocalVariable B= new BolleanLocalVariable(); B.test(); } } 3. Program output public static void main(String[] args) { // TODO Auto-generated method stub int[] a= {3,5,8}; a[1]=7; int[] b=a; System.out.println(a[0]+" "+a[1]+" "+a[2]); System.out.println(b[0]+" "+b[1]+" "+b[2]); } 4.Program output public class FinallyWithSExitDemo { public static void main(String[] args) { // TO DO Auto-generated method stub try{ System.exit(0); }finally{ System.out.println("Hi i am in finally block"); } } } 5. Valid Thread class constructors 6. 7. Longest sub range of pure number 8. Length of unique K elements First Line T Test case Second N,K Elements separated by space Third line N elements with in the range of k 9. Find nth value of provided Palindrome list with the combination of 4 and 5 like 44,55,4545

In coding test, one question was to find the count of unique characters in the given string. Other question was to get the country code of the given country from the given URI where you can pass country name name & get some data. Then you will need to parse that data to fetch the country code field data. The manager was looking for some 10+ years experienced person who designed & built the enterprise level applications from scratch, means some person who can confidently fake his/her intelligence & can fit to DBS policies to fool the people. He wanted to know that design. In short, its all fake show-off here that they do exceptional work but reality will be total opposite.
avatar

Senior Java Developer/Lead

Interviewed at DBS Bank

3.8
Jul 30, 2022

In coding test, one question was to find the count of unique characters in the given string. Other question was to get the country code of the given country from the given URI where you can pass country name name & get some data. Then you will need to parse that data to fetch the country code field data. The manager was looking for some 10+ years experienced person who designed & built the enterprise level applications from scratch, means some person who can confidently fake his/her intelligence & can fit to DBS policies to fool the people. He wanted to know that design. In short, its all fake show-off here that they do exceptional work but reality will be total opposite.

* Spring boot questions ORM tools, Annotations, stream API, Rest Api, Sql joins with example, again some annotations, Java 8 features * for machine test they have asked for the fine occurrence in the string (google it)
avatar

Java Delevoper

Interviewed at IBS Software

3.8
Jun 6, 2023

* Spring boot questions ORM tools, Annotations, stream API, Rest Api, Sql joins with example, again some annotations, Java 8 features * for machine test they have asked for the fine occurrence in the string (google it)

Viewing 2611 - 2620 interview questions

Glassdoor has 30,904 interview questions and reports from Java trainee interviews. Prepare for your interview. Get hired. Love your job.