Java Programming OOPs
Questions 261 to 270
261.
|
When an
applet container encounters an HTML file that specifies an applet to execute,
the applet container automatically loads ________ of the applet from the same
directory as that of the HTML file.
|
||||||||||
Which of
the following is the default Layout Manager for an Applet?
|
|||||||||||
Single-line
comments that should be ignored by the compiler are denoted using
|
|||||||||||
Which of
the following escape sequences represents carriage return?
|
|||||||||||
What is
the value of result after the following Java statements execute?
int a, b, c, d;
a = 4;
b = 12;
c = 37;
d = 51;
result = d % a * c + a % b + a;
|
|||||||||||
List the
following operators in the order that they will be evaluated: -, *, (), %, +,
/. Assume that if two operations have
the same precedence, the one listed first will be evaluated first.
|
|||||||||||
If ClassA extends ClassB, then
|
|||||||||||
Which
exception is thrown by the
getConnection() method of the DriverManager class?
|
|||||||||||
Which of
the following is valid to open a database connection?
|
|||||||||||
What does
the following code do?
smt=con.createStatement();
|
Answers
261.
|
Answer : (b)
Reason : the
.class
file
|
Answer : (a)
Reason : FlowLayout
is the default Layout Manager for an Applet
|
|
Answer : (a)
Reason : Two
forward slashes ( //
).
|
|
Answer : (b)
Reason : The
escape sequence represents carriage return is . \r.
|
|
Answer : (a)
Reason : the
result of the above expression is 119.
|
|
Answer : (d)
Reason : The
correct order is (), *, /, %, -, +.
|
|
Answer : (b)
Reason : ClassB
is a base class.
|
|
Answer : (c)
Reason : SQLException
is thrown by the getConnection() method of the Driver Manager classs.
|
|
Answer : (a)
Reason : Connection
con=DriverManager.getConnection(url, userid, password); is valid to open a database connection
|
|
Answer : (b)
Reason : A
Statement object is created to send sql commands to the database.
|
"Great blog created by you. I read your blog, its best and useful information. You have done a great work. Super blogging and keep it up.php jobs in hyderabad.
ReplyDelete"
thank you.
ReplyDeletejava tutorial
java tutorial