Home Tutorial Java Scjp Part10 SCJP Module-10 Question-2


Share on Google+Share on Google+
SCJP Module-10 Question-2
Posted on: July 16, 2010 at 12:00 AM
The sample example given below will test your understanding of File class of Java.

Given a sample code:

import java.io.File;

public class Test {
public static void main(String[] args) throws Exception {
File file = new File("test.txt");

What will the result if it is compiled and run at first time?

(A) true
(B) false 
(C) Compile time error.
(D) Raise run-time exception.




Related Tags for SCJP Module-10 Question-2:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 16, 2010

Recommend the tutorial

Advertisements Advertisements