Java 3 online test, online practice test, exam, quiz

Java 3 Online Test

The purpose of this online test is to help you evaluate your Java 3 knowledge yourself. These Multiple Choice Questions (MCQs) on Java 3 will prepare you for technical round of job interview, written test and many certification exams.

The test contains 22 questions and there is no time limit. You will get 1 point for each correct answer. You will get your online test score after finishing the complete test.
(Total 22 questions)        (Time spent 0:0)

1. class test { }

public class test1 implements Serializable
{
private test k = new test();

public static void main(String[] args)
{
test1 c = new test1 ();
c.store(c);
}

void store (test1 c)
{
try {
ObjectOutputStream os = new ObjectOutputStream(
new FileOutputStream("myFile"));
os.writeObject(c);
os.close();
System.out.println("done");
}
catch (Exception x)
{
System.out.println("out");
}
}

}

What would be the result?

   View Test Answer
Advertisement