Programmer Trainee Interview Questions

25,414 programmer trainee interview questions shared by candidates

what is the output public class Barclays { static class A{ A(){ f(); } public void f(){ System.out.println("A ctor"); } } static class B extends A{ B(){ f(); } public void f(){ System.out.println("B ctor"); } } public static void main(String[] args) { B b = new B(); b.f(); A a = new A(); a.f(); } }
avatar

Java Programmer

Interviewed at Barclays

4
Jan 15, 2010

what is the output public class Barclays { static class A{ A(){ f(); } public void f(){ System.out.println("A ctor"); } } static class B extends A{ B(){ f(); } public void f(){ System.out.println("B ctor"); } } public static void main(String[] args) { B b = new B(); b.f(); A a = new A(); a.f(); } }

Viewing 151 - 160 interview questions

Glassdoor has 25,414 interview questions and reports from Programmer trainee interviews. Prepare for your interview. Get hired. Love your job.