Quiz on Java Static Binding Vs Dynamic Binding
Free Java courses with 37 real-time projects - Learn Java
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
- Question 1 of 15
1. Question
When the type of object creation and method invocation is done at the execution time it is called as ?
CorrectIncorrect - Question 2 of 15
2. Question
class Binding {
public void method {
System.out.println(‘DataFlair”);
}
}
class Main {
public static void main ( String args [ ] )
{
Binding obj = new Binding();
obj.method();
}
}
The given program is a sample of which of the following ?
CorrectIncorrect - Question 3 of 15
3. Question
class Inheritance {
public void show()
{
System.out.println(“DataFlair webservices”);
}
}
class Main {
public static void main ( String args [ ] )
{
Inheritance object = new Inheritance();
object.show();
}
}
What will be the output of the program ?
CorrectIncorrect - Question 4 of 15
4. Question
When all the methods cannot be overridden, which type of binding can be used for it ?
CorrectIncorrect - Question 5 of 15
5. Question
Which of the following is the correct syntax of dynamic binding in Java ?
CorrectIncorrect - Question 6 of 15
6. Question
class Sample {
public void show()
{
System.out.println(“Static binding sample”);
}
}
class Example {
public void show()
{
System.out.println(“Dynamic binding sample”);
}
}
class Main {
public static void main ( String args [ ] )
{
Sample s = new Sample();
s.show();
}
}
What is the output of the program ?
CorrectIncorrect - Question 7 of 15
7. Question
Which of the following will be helpful to perform dynamic binding ?
CorrectIncorrect - Question 8 of 15
8. Question
class Inheritance {
public void print()
{
System.out.println(“Inheritance is not used”);
}
}
class Base {
public void print()
{
System.out.println(“Inheritance is used”);
}
}
class Main {
public static void main ( String args [ ] )
{
Inheritance i = new Base();
i.print();
}
}
What is the output of the program ?
CorrectIncorrect - Question 9 of 15
9. Question
class First {
void Display( string a)
{
System.out.println(a);
}
}
class Second extends First {
void Display( )
{
System.out.println(a);
}
}
class Main {
public static void main ( String args [ ] )
{
First obj = new Second();
obj.Display(“DataFlair”);
}
}
What is the error in the program ?
CorrectIncorrect - Question 10 of 15
10. Question
Dynamic binding is possible in which of the following ?
CorrectIncorrect - Question 11 of 15
11. Question
class A {
public void disp()
{
System.out.println(“Class A method”);
}
}
class B {
public void disp()
{
System.out.println(“Class B method”);
}
}
class Main {
public static void main ( String args [ ] )
{
A a = new A();
B a = new B();
a.disp();
}
}
What will be the output of the program ?
CorrectIncorrect - Question 12 of 15
12. Question
class Demo {
public void show( String a)
{
System.out.println(a);
}
}
class Main {
public static void main ( String args [ ] )
{
Demo obj = new Demo();
obj.show(“DataFlair”);
}
}
What is the output of the program ?
CorrectIncorrect - Question 13 of 15
13. Question
Which type of binding should be used for classes containing final methods ?
CorrectIncorrect - Question 14 of 15
14. Question
class Dynamic {
int Text()
{
System.out.println(“Example for Static binding”);
}
}
class Static extends Dynamic {
int Text()
{
System.out.println(“Example for Dynamic binding”);
}
}
class Main {
public static void main ( String args [ ] )
{
Dynamic object = new Static();
object.Text();
}
}
What is the output of the program ?
CorrectIncorrect - Question 15 of 15
15. Question
Which of the following is the correct syntax for static binding in Java ?
CorrectIncorrect
Your opinion matters
Please write your valuable feedback about DataFlair on Google