Sapient Company Programming

In Java______ is related to compile time polymorphism, while______ is related to run time polymorphism.

1) Overloading, inheritance
2) Inheritance, Overriding
3) Overloading, Overriding
4) Overriding, Overloading

Read Solution (Total 2)

Sapient Other Question

Bob, and Android programmer, wants to set trigger to Alarm of his Android phone after three days.
What would Bob do to achieve this?

1) Bob would use AlarmManager and call set() method to set after three days. Even if the phone switches off in between the alarm would ring.
2) Bob would use AlarmManager and call set() method to set after three days. Before switching the phone off Bob would maintain all the alarm details in the database and recreate it after switching it on.
3) Bob has to do nothing as Android takes care of automatic Alarm Triggering events
4) Since all alarm details will get killed after phone gets switched off. what Bob is trying to achieve is not possible.
Which of the following statements is/are correct regarding inheritance in Java?

A. Private methods cannot be overridden.
B. Inherited classes are not accessible outside a package.
C. Protected methods are final while private methods are not.

1) Statement A is wrong
2) Statement B is wrong
3) Statement C is correct
4) Statement B is correct but Statement C is wrong.