Java SE 8 Programmer 1Z0–808 Practice Full Test 1

© examsiri.com
Question : 1 of 84
 
Marks: +1, -0
Given the code fragment:
1. class X {
2.    public void printFileContent () {
3.       /* code goes here */
4.       throw new IOException () ;
5.    }
6.   }
7. public class Test{
8.     public static void main(String[] args) {
9.       X xobj=newX();
10.     xobj.printFileContent();
11.   }
12. }

Whichtwo modifications should you make so that the code compiles successfully? (Choose two.)
Go to Question: