1. When does method overloading is determined?
(a) At run time
(b) At compile time
(c) At coding time
(d) At execution time
2. Which concept of Java is a way of converting real world objects in terms of
class?
(a) Polymorphism
(b) Encapsulation
(c)Abstraction
(d) Inheritance
3. Which concept of Java is achieved by combining methods and attribute into
a class?
(a) Encapsulation
(b) inheritance
(c)Polymorphism
(d) abstraction
Answers
Answer:
1. (B) At compile time
2. (C) Abstraction
3. (A) Encapsulation
Explanation:
1. Polymorphism, which works at compile-time, includes method overloading.
2. The concept of abstraction is the definition of real-world objects in terms of classes or interfaces.
3. A class is used to implement encapsulation by combining methods and attributes. The class serves as a container for properties that are encapsulated.
#SPJ3
Answer:
(b) At compile time
(c)Abstraction
(a) Encapsulation
Explanation:
- Overloading is determined at compile time. It is also called as compile time polymorphism.
- The concept of java that define real world objects in terms of classes and interfaces is Abstraction. It is a process of hiding some details and showing only whats required to the user.
- The concept of Java that is implemented by combining methods and attribute is encapsulation.
So, the answers are:
1. When does method overloading is determined?
(a) At run time
(b) At compile time
(c) At coding time
(d) At execution time
2. Which concept of Java is a way of converting real world objects in terms of
class?
(a) Polymorphism
(b) Encapsulation
(c)Abstraction
(d) Inheritance
3. Which concept of Java is achieved by combining methods and attribute into
a class?
(a) Encapsulation
(b) inheritance
(c)Polymorphism
(d) abstraction
#SPJ2