CS506-Midterm
1 / 50
A top level class without any modifier is accessible to
2 / 50
Which of the following syntax is used to attach an input stream to console?
3 / 50
The collections API are defined in ______ package?
4 / 50
The code below draws a line. What color is the line? g.setColor(Color.red.green.yellow.red); g.drawLine(0, 0, 100,100);
5 / 50
To create DataBaseMetaData object we write following line of code
6 / 50
What if the main method is declared as private?
7 / 50
Which of the following is called ' pure abstract class ' ?
8 / 50
Which of the following feature provide facility for multiple inheritances:-
9 / 50
Which of the following statement object is used to execute stored procedures?
10 / 50
____________is/are the JSP Implicit Object(s).
11 / 50
A top level class may have only the following access modifier.
12 / 50
In Java garbage collection is done by_______________
13 / 50
Which of the following stream read/write data in the form of bytes?
14 / 50
Which of the following package needs to import while interacting with relational database?
15 / 50
Event source can have --------- listeners registered on it.
16 / 50
You can ---------to a network using sockets.
17 / 50
CREATE, ALTER, DROP are _________ SQL statements.
18 / 50
When defining a method you must include a ___________ to declare any exception that might be thrown but is not caught in the method.
19 / 50
There are _________ types of exceptions in Java
20 / 50
Which of the following function will be used to register event handler with events generator (button)?
21 / 50
DSN stands for _________
22 / 50
In Java an abstract class cannot be sub-classed
23 / 50
The relationship between class and interface is called ________
24 / 50
ServletConfig defines a set of methods that a servlet uses to communicate with its servlet container.
25 / 50
If we remove static from main then program __________
26 / 50
When recursive method is called to solve a problem, the method actually is capable of solving only the simpler case(s), or base case(s).
27 / 50
Which of the following is a general purpose container?
28 / 50
Which of the following is true about AWT and SWING components?
29 / 50
In Java, which of these classes implement the LayoutManager interface?
30 / 50
What if the static modifier is removed from the signature of the main method?
31 / 50
BorderLayout is the default layout manager for a JFrame content pane
32 / 50
33 / 50
You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?
34 / 50
Exceptions must be handled while handling files otherwise it may lead to____?
35 / 50
36 / 50
Window Listener interface contains _______ methods.
37 / 50
38 / 50
Mouse events can be trapped for ________ GUI component.
39 / 50
JavaBeans are?
40 / 50
Socket is a --------------communication channel between hosts.
41 / 50
Aside from the Scanner class, which of the following class/es can be used for text file file input
42 / 50
43 / 50
44 / 50
Java developed in __________
45 / 50
Given a one dimensional array arr, what is the correct way of getting the number of elements in arr
46 / 50
47 / 50
48 / 50
A final class can't be extended.
49 / 50
A ................defines the way and method of communication between two parties
50 / 50
Exceptions must be handled while handling files otherwise it may lead to _____
Your score is
The average score is 32%
Restart quiz