Assignment on JAVA
1.
Who is the father of java ___________?
|
||||||||
(a)
James Gosling
|
(b)
Bjarne Stroustrup
|
(c)
Bill Joy
|
(d)
Larry Page
|
|||||
2.
Java programming was designed by _______________?
|
||||||||
(a)
Mozilla corporation
|
(b)
Amazon Inc.
|
(c)
Sun Microsystem
|
(d)
Microsoft
|
|||||
3.
Currently java is own by ____________?
|
||||||||
(a)Oracle
Corporation
|
(b)
Microsoft
|
(c)
Apple
|
(d)
Sun Microsystem
|
|||||
4.
Earlier name of Java programming language was
___________?
|
||||||||
(a)
Oak
|
(b)
Eclipse
|
(c)
D
|
(d)Netbean
|
|||||
5.
JVM stands for
|
||||||||
(a)
Java Verified Machine
|
(b)
Java virtual machine
|
(c)
Java Very Large Machine
|
(d)
Java very small Machine
|
|||||
6.
JRE stands for
|
||||||||
(a)
Java Real Environment
|
(b)
Java Rapid Enterprise
|
(c)
Java Runtime Environment
|
(d)
None
|
|||||
7.
Command to
compile a java program___? (let the filename be hello.java)
|
||||||||
(a)
java hello.java
|
(b)
javac hello.java
|
(c)
java hello
|
(d)
javac hello
|
|||||
8.
Command to execute a java program___? (let the filename be hello.java)
|
||||||||
(a)
java hello.java
|
(b)
javac hello
|
(c)
javac hello.java
|
(d)
java hello
|
|||||
9.
Java source codes are compiled and converted to
_____________
|
||||||||
(a)
Object codes
|
(b)
Assembly codes
|
(c)
Binary codes
|
(d)
Byte codes
|
|||||
10.
Full form of JAR is _______________?
|
||||||||
(a)
Java Archive
|
(b)
Java Applet
|
(c)
Java Appletwatcher
|
(d)
None
|
|||||
11.
________tool is used to compile java code?
|
||||||||
(a)
jar
|
(b)
javadoc
|
(c)
javac
|
(d)
java
|
|||||
12.
________tool is used to execute java code?
|
||||||||
(a)
java
|
(b)
rmic
|
(c)
javac
|
(d)
javadoc
|
|||||
13.
Garbage collection takes place automatically in
JVM.
|
||||||||
(a)
True
|
(b)
False
|
|||||||
(a)
Internationalized Development Environment
|
(b)
Integrated Development Environment
|
(c)
Indian Development Environment
|
(d)
None
|
|||||
15.
Eclipse is a free open source integrated
development environment
|
||||||||
(a)
True
|
(b)
False
|
|||||||
16.
Runnable is ____________
|
||||||||
(a)
class
|
(b)
method
|
(c)
variable
|
(d)
interface
|
|||||
17.
Which keyword represents object of the present
class?
|
||||||||
(a)
interface
|
(b)
package
|
(c)
this
|
(d)
static
|
|||||
18.
Which method can’t be overridden?
|
||||||||
(a)
static
|
(b)
final
|
(c)
abstract
|
(d)
println
|
|||||
19.
Which variable’s value can’t be changed? / Which
variable behaves as a constant?
|
||||||||
(a)
static
|
(b)
instance
|
(c)
abstract
|
(d)
final
|
|||||
20.
Which class can’t be inherited? / Which class
behaves as a constant?
|
||||||||
(a)
final
|
(b)
abstract
|
(c)
interface
|
(d)
none
|
|||||
21.
Which variable’s value can be changed?
|
||||||||
(a)
final
|
(b)
abstract
|
(c)
Both (a) & (b)
|
(d)
none
|
|||||
22.
For which class inheritance is must?
|
||||||||
(a)
final
|
(b)
abstract
|
(c)
Both (a) & (b)
|
(d)
none
|
|||||
23.
For which method overriding is must?
|
||||||||
(a)
abstract
|
(b)
final
|
(c)
static
|
(d)
instance
|
|||||
24.
Java has _________ primitive data types.
|
||||||||
(a)
9
|
(b)
8
|
(c)
7
|
(d)
6
|
|||||
25.
What is the content of an interface?
|
||||||||
(a)
Constant variables and abstract methods
|
(b)
Final variables and abstract methods.
|
(c)
Abstract variables and final methods
|
(d)
Both (a) & (b)
|
|||||
26.
main() method parameter has which type of data
type?
|
||||||||
(a)
int
|
(b)
char
|
(c)
String
|
(d)
double
|
|||||
27.
How many keywords are available in java?
|
||||||||
(a)
48
|
(b)
55
|
(c)
50
|
(d)
None
|
|||||
28.
Which type of inheritance is not supported by
Java?
|
||||||||
(a)
Single
|
(b)
Multiple
|
(c)
Multilevel
|
(d)
Hierarchical
|
|||||
29.
When a class inherits another class which keyword
is used?
|
||||||||
(a)
extends
|
(b)
implements
|
(c)
static
|
(d)
abstract
|
|||||
30.
What is the output of the following program?
class Hello
{
int i;
float j;
}
class Test
{
public static void main(String a[])
{
Hello h= Hello();
System.out.println(“h.i= ” +h.i+ “, h.j=”+h.j);
}
}
|
||||||||
(a)
h.i=0, h.j=0
|
(b)
h.i=0, h.j=0.0
|
(c)
Compilation Error
|
(d)
Run time error
|
|||||
0 comments:
Post a Comment