Advertisement

cs506 Web site and Development midterm paper

Which of the following is modifier is provided by default if no access is written explicitly?
1. public
2. Private
3. Protected
4. Default
This is used to ________
1. Invokes constructor of another class
2. Invokes alternate constructor from same class
3. Invokes constructor of super class from sub class
4. Invokes constructor of sub class from super class
Java program code is compiled into form called
1. Machine code
2. native Code
3. Byte Code
4. Source Code
There are _________ types of exceptions in Java
1. 2
2. 3
3. 4
4. 5
Border layout divides the area into _______ regions
1. 3
2. 4
3. 5
4. 6
Static methods only access ___
1. instance variable
2. instance method
3. static variables and methods
4. both static and instance members
Q) What value does readline() return when it has reached the end of a file? Marks 1
Q) Why we use paintchildern() method? Marks 1
Q) What is purpose of finalization? Marks 2
Q) Which method is used to read an object through serialization? Marks 3
Q) How can we convert the following string to corresponding integer value? Marks 5
String value = “123”;
Q You are required to write a program using collection The collection must add object of type Vehicle. The class vehicle must have attributes manufacture name model and year. The class must have one part method first the program add 3 objects in to collection and then get these objects from collection after telling each object call the print method? Marks 10
0 Responses