Core Java Interview questions


Total available count: 646
Subject - Java Technologies
Subsubject - Core Java

How object can be created using object deserialization in java?

Suppose 'sample' is the class name,then the syntax is as follows
 FileOutputStream out = new FileOutputStream("sample.txt"
  ObjectOutputStream oout = new ObjectOutputStream(out
   oout.writeObject(object3
   oout.flush(
   ObjectInputStream ois = new ObjectInputStream(new FileInputStream("sample.txt")
   sample object5 = (sample) ois.readObject(




Next 5 interview question(s)

1

How object can be created using newinstance() in java?

2

How object can be created using clone() in java?

3

How object can be created using Class.forName()in java?

4

What is the difference between class and object in java?

5

How object can be created using new keyword in java?