Answer
Answer
b) Use same function call to execute member functions of objects from different classes
a) a is true b is false
b) a is false b is true
a) Virtual function
b) Function overloading
c) Both above
d) None of these
a) The Buffered Input Stream class creates and maintains a buffer for an input stream.
iv) None
a) 23000
b) 450.6
a)’SUM’
b) ‘9’
i) a is true b is false
a)&&
b)++
i) a is true b is false
7. a) the class at the top of the exception classes hierarchy is called Error.
i) a is true b is false ii) a is false b is true iii) Both a and b is true iv) Both are false
8.a) The exception class is used for the exceptional conditions that have to be trapped in a program
i) a is true b is false
a)default
b)break
c)continue
d)none
b) The class at the top of the exception classes hierarchy is called Error
i) a is true b is false
11. ----------- is a highly optimized set of instructions designed to be executed by the Java runtime
D) Bytecode ,Microsystems.
12.Two kinds of data types in java are _________and __________ Primitive and non primitive are 2
data types in java
A) Primitive,standard
B) Primitive,Abstaract
C) abstract,derived
D) constants, variables
13. Which of the following is not a java data type?
1. byte
2. register
3. long
4. nibble
5. int
6. char
A) 4 and 5 only
B) 1and 3 only
C) 5 and 6 only
D) 2 and 4 only
14. The output of the following Program is (Sorry but no program is showing in th qn set!)
16.The ______ keyword is used to derive a class from a superclass. The ________keyword is used to
declare classes that define common properties and behavior of other
classes
A) Public ,friend
B) abstract ,extends ,
C) extends , abstract
D) friend ,Public
17. A class can be declared as _______ if you do not want the class to be subclassed. Using
A) protected ,interface
B) final,interface
C) public,friend
D) final,protected
18.The term exception denotes an ________ event .Java handles exceptions the
______________ way.
A) exceptional ,object-oriented
B) traditional, object-oriented
C) exceptional, procedural
D) friend ,Public
19. Identify the situations in which an null exception is NOT thrown
A) 1
B) 3
C) 4
D) 2
20. The two major classes for byte streams are ______ and ______
A) Input,Output.
B) byteStream,bitStream.
C) InputStream,OutputStream.
D) stringStream,stingStream.
21. The _______ and ________ classes are filter streams that allow the reading and
A) InputStream, OutputStream
B) DataInputStream, DataOutputStream
C) Input,Output.
D) byteStream,bitStream.
22. The ______ method takes a Graphics class object as a parameter. The _______ method
A) paint (),update ()
B) repaint(),Paint()
C) update () , paint ()
D) Paint(),repaint()
23. Which of the following method does not belong to graphics class?
A. Text
B. pixel
C. Lines
24. To establish a connection with a database, you need to register the ODBC-JDBC Driver by
calling the _________ method from the Class class and then calling the _______ method
A) getConnection (),forName ()
B) for () , get ()
1. The sql.java package contains classes that help in connecting to a database, send SQL
2. The Stringset () method sets the query parameters of the Prepared Statement Object.
A. 1-T,2-T
B. 1-T,2-F
C. 1-F,2-F
D. 1-F,2-T
26. The __________ is used to handle the errors that may occur during the invocation of a
A) Interface,TCP
B) Exception,TCP
C) Exception,UDP
D) Interface,UDP
A. 1-T,2-T
B. 1-T,2-F
C. 1-F,2-F
D. 1-F,2-T
28. Arrange the following steps to complete a request and response in a typical web application
2. Web application will collect data from the user. (First tier)
A) 1-2-5-3-4
B) 2-1-4-5-3
C) 2-1-3-4-5
D) 1-2-4-5-3
4. The basic idea behind 3-tier architecture is that to separate application logic from the
user interface
A. 1-T,2-T
B. 1-T,2-F
C. 1-F,2-F
D. 1-F,2-T
30. In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the
ServletConfig object ?
(a) getServletInfo()
(b) getInitParameters()
(c) getServletConfig()