You are not logged in.
- Index
- » Quiz Questions
- » Java Result:
- 0
Pages:: 1
#1 2015-06-10 10:57:14
Java Result:
Question:
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?
Option A):
out
Option B):
done
Option C):
compile error
Option D):
One object is serialized
Correct Answer is Option A):
out
You cannot discover the new oceans unless you have the courage to lose the sight of the shore.
Offline
2015-06-10 10:57:14
- Advertisement
- Ads By Google
Re: Java Result:
Pages:: 1