Programming - Introduction to OOPS
You Are Here :: Home > JAVA > Introduction to OOPS - General Questions
7. |
What is overloading?
|
A. |
Same name different parameters |
B.
|
Same name same parameters |
C.
|
Different name different parameters
|
D.
|
Different name and same parameters
|
|
Answer: Option A
Explanation:
Overloading is nothing but having the same name with different parameters (or) The same function having different functionality. |
|
8. |
What is overriding?
|
A. |
Same name and same method |
B.
|
different name and same method |
C.
|
different name and different method
|
D.
|
same name and differet method
|
|
Answer: Option A
Explanation:
Overriding is nothing but having same name and method signature. |
|
9. |
What are the access modifiers?
A) Public
B) Private
C)Protected
|
A. |
Both A and C |
B.
|
Both A and B |
C.
|
both A and C
|
D.
|
all of these
|
|
Answer: Option D
Explanation:
The access modifiers are public,private,protected |
|
10. |
Can we call the non static variables into static methods?
|
A. |
Yes |
B.
|
No |
C.
|
Cant say
|
D.
|
May be
|
|
Answer: Option B
Explanation:
No, vice versa is also not possible. |
|
11. |
Dose Java supports multiple inheritances?
|
A. |
Yes |
B.
|
No |
C.
|
Cant say
|
D.
|
May be
|
|
Answer: Option B
Explanation:
No. Interfaces are used for this purpose. |
|
12. |
Can we get the output using Constructors?
|
A. |
Yes |
B.
|
No |
C.
|
Cant say
|
D.
|
May be
|
|
Answer: Option B
Explanation:
No, These are used only for assigning values. |
|
« prev
next »