Exam Permalink:
https://www.jobilize.com/java-certification-questions
Question Permalink:
https://www.jobilize.com/how-to-usea-try-catch-in-java
Question 37 / 297:  What is the expected output?
interface Foldable {

public void fold() throws Exception ;

}

class Paper implements Foldable {

public void fold() { // line 6

System.out.print("Fold");

}

}

public class Tester {

public static void main(String args []) {

Foldable obj1 = new Paper();

obj1.fold(); // line 8

Paper obj2 = new Paper(); // line 10

obj2.fold();

}

}

A  FoldFold
B  Compilation error at line 6, fold() must declare at header throws Exception
C  Compilation error at line 8, unhandled exception
D  RuntimeException at line 8
E  Compilation error at line 10, unhandled exception
<< First < Previous Next > Last >>
Exam Home Page
https://www.jobilize.com/java-certification-questions

Oracle Certified Professional Java Programmer

Author:

Access: Public Instant Grading

Ask
Hannah Sheth
Start Quiz
Madison Christian
Start Exam
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-certification-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>