Senior Developer Interview Questions

98,165 senior developer interview questions shared by candidates

1. Class A has variable a, Class B extends from A which has b, Class C extends from Class B which has c. Set values for those variables. Write a clone method which returns a deep copy. For example ClassA a = new ClassC(5); which will print 5,4,3 set by constructors in those classes. ClassA x = a.myClone(); x.print() should also print 5,4,3.
avatar

Senior Software Engineer

Interviewed at Anaplan

3.6
Nov 18, 2016

1. Class A has variable a, Class B extends from A which has b, Class C extends from Class B which has c. Set values for those variables. Write a clone method which returns a deep copy. For example ClassA a = new ClassC(5); which will print 5,4,3 set by constructors in those classes. ClassA x = a.myClone(); x.print() should also print 5,4,3.

Viewing 1051 - 1060 interview questions

Glassdoor has 98,165 interview questions and reports from Senior developer interviews. Prepare for your interview. Get hired. Love your job.