JAVA
2.7K subscribers
73 photos
111 files
76 links
Download Telegram
You read the following statement in a Java program that compiles and executes.
submarine.dive(depth);
What can you say for sure?
Anonymous Quiz
0%
depth must be an int
23%
dive must be a method.
32%
dive must be the name of an instance field.
36%
submarine must be the name of a class
9%
submarine must be a method.
The java run time system automatically calls this method while garbage collection.
Anonymous Quiz
9%
finalizer()
55%
finalize()
24%
finally()
12%
finalized()
What is the output of the following code:
class eq
{ public static void main(String args[]) { String s1 = “Hello”; String s2 = new String(s1); System.out.println(s1==s2); } }
Anonymous Quiz
35%
true
53%
false
12%
0
0%
1
All exception types are subclasses of the built-in class
Anonymous Quiz
31%
Exception
23%
RuntimeException
6%
Error
40%
Throwable
When an overridden method is called from within a subclass, it will always refer to the version of that
method defined by the
Anonymous Quiz
33%
Super class
53%
Subclass
13%
Compiler will choose randomly
0%
Interpreter will choose randomly
Which of the following is not a component of Java Integrated Development Environment (IDE)?
Anonymous Quiz
14%
Net Beans
29%
Borland’s Jbuilder
25%
Symantec’s Visual Café
14%
Microsoft Visual Fox Pro
18%
Microsoft Visual J++.
Identify, from among the following, the incorrect variable name(s).
Anonymous Quiz
4%
_theButton
23%
$reallyBigNumber
54%
2ndName
12%
CurrentWeatherStateofplanet
8%
my2ndFont
Consider the following Java program :
class IfStatement{
public static void main(String args[])
{
int a=2, b=3;
if (a==3)
if (b==3)
System.out.println("===============");
else
System.out.println("#################");
System.out.println("&&&&&&&&&&&");
}
}
Which of the following will the output be?
(a) ===============
(b) #################
&&&&&&&&&
(c) &&&&&&&&&&&
(d) ===============
#################
&&&&&&&&&&
(e) ################