Multiple Choice Question

Quiz Guidelines

 

QID: 
379
Question: 

Consider the following interface definition:

interface Bozo{
int type = 0;
public void jump();
}
Now consider the following class:
public class Type1Bozo implements Bozo{
public Type1Bozo(){
type = 1;
}
public void jump(){
System.out.println("jumping..."+type);
}
public static void main(String[] args){
Bozo b = new Type1Bozo();
b.jump();
}
}

What will the program print when compiled and run?

Select 1 option

A. jumping...0
B. jumping...1
C. This program will not compile.
D. It will throw an exception at runtime.

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!