Tuesday 17 July 2012

VU Midterm Paper 2011 CS506-Web Design and Development


Midterm Paper 2011  CS506-Web Design and Development

Midterm Paper 2011  CS506-Web Design and Development
Q. How can we prevent serialization? 5 marks
Answer:
We should use transient keyword mark a field that should not be serialized.
For example:
Transient OutputStream os;
transient Connecction conn;
Transient fields are returned as null once its read
Example:
import javax.swing.*;
import java.io.*
class Address implements Serializable{
String Street;
String City;
transient String HouseNo.;
-
-
-
-
}
(Bonfire, vuzs)
Why do we use prepared Statement object? 5 marks
How can a GUI component handle its own events? 3 marks
What Difference between serialization and de-serialization? 3 marks
Write Different between abstract class and interface class? 2 marks
Write 4 types of JDBC Driver. 2 marks
If a method is declared as protected where can be the method accessed? 2 marks
How do we load a driver and how do we define a connection for URL and JDBC (5)
What is the difference between Applet and Application (5)
Can an anonymous class be declared as implementing an inheritance and extending a class (3)
Difference between serialization and deserialization (3)
Difference between character oriented and byte oriented streams (2)
Why is executeUpdate() used (2)
Name component subclasses that support painting (2)

No comments:

Post a Comment