Question 142 / 297:  The following code contains compilation errors, what of the following possible solutions (made together) can be done to remove these errors, putting in mind that all necessary imports will be added automatically?
Choose 2
import java.io.File;

import java.text.DateFormat;

import java.util.Date;

public class Tester {

static void call() { // line 3

File file = new File("javachamp.dat"); //line 4

file.createNewFile(); // line 5

throw new IllegalArgumentException(); // line 6

}

public static void main(String[] args) {

call(); // line 11

DateFormat df = DateFormat.getDateInstance(); // line 12

Date parse = df.parse("12.11.2009"); // line 13

}

}

<< First < Previous Next > Last >>
Exam Home Page
Ask
Jemekia Weeden
Start Quiz
Edgar Delgado
Start Quiz
Madison Christian
Start Test
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>