The IT Certification Resource Center

Featured Deal

Get CompTIA, Cisco, or Microsoft training courses free for a week.
Learn More ❯
Promotions

Oracle Java Quiz 1

Question 2:

Given

1.  class Ex6{
2.  public static void main(String args[]){
3.    int x = 0, y=10;          
4.      try{
5.        y /=x; 
6.        }
7.    System.out.print("/ by 0");
8.      catch(Exception e){
9.        System.out.print("error");
10.      }
11.  }  } 

What is the result?

 

A. 0
B. error
C. Compilation fails
D. An uncaught exception is thrown at runtime. E. No output

data-mce-data-mce-alt="Question 3" class="system-pagebreak" </>

Question 3:

Given

- A and E are classes
- B and D are interfaces
- C is an abstract class

Which are true? (Choose 3)

A. class F implements B,C{ }
B. class F implements B{ }
C. class Fextends A,E{ }
D. class F extends E{ }
E. class F implements B,D{ }