Software Engineer Test 1
Software Engineer Test 1
6. What is the process of defining a method in a subclass having same name & type
signature as a
method in its superclass?
a) Method overloading
b) Method overriding
c) Method hiding
d) None of the mentioned
7. What is the use of final keyword in Java?
a) When a class is made final, a subclass of it can not be created
b) When a method is final, it can not be overridden.
c) When a variable is final, it can be assigned value only once.
d) All of the above
10. Given a sorted array of distinct integers and a target value, return the index if the target
is found.
If not, return the index where it would be if it were inserted in order. You must write an
algorithm
with O(log n) runtime complexity.
Input: nums = [1,3,5,6], target = 5
Output: 2