java june2013 paper2
TRANSCRIPT
-
7/26/2019 Java June2013 Paper2
1/6
[2
7]
In Multithreaded programming, when we create a thread object it is said to be in what
state
Choice a running
Choice b newborn
Choice c dead
Choice d blocked
[2
6]
Which o the ollowing step is in!alid or creating a package
Choice a "eclare the package in beginning o
the ile
Choice b "eine the classes to be put in the
package # declare it publicChoice c Create the listing as ja!a in the
$ubdirector% b% package menu
Choice d &'ecute this ja!a ile
[22] (he si)e o arra% in ja!a is stored in
Choice
a
*ariable length
Choiceb
*ariable len
Choice
c
Methods length
Choice
d
Method len
[2+] What is wrong in the ollowing code
abstract class print
abstract show-./0
class displa% e'tends print
0
Choice
a
1othing is wrong
Choice
b
Method show-. should ha!e a return t%pe
Choicec
Method show-. is not implemented in class displa%
-
7/26/2019 Java June2013 Paper2
2/6
Choice
d
class displa% does not contain an%thing
[3] What ke%word can protect a class in a package rom accessibilit% b% the
classes outside the package
Choice
a
pri!ate
Choice
b
protected
Choice
c
public
Choiced
deault -also without using this ke%word.
[
4]
What line numbers will cause an error when %ou compile this code
class itest
2
5 public static !oid main-$tring args[].
4
int i2/
6 i-i2.
7 $%stem8out8println-9Correct:./ 0
; else3 $%stem8out8println-9Incorrect:./ 0
+ 0
0
Choice a ,3,+
Choice b 6,3
Choice c 6
Choice d 3,+
[5] Which o the ollowing is (rue with respect to branching statements i #
switch
Choi
ce a
e!er% i statement can be written using switch
Choi
ce b
e!er% switch statement must ha!e a deault case
Choi
ce c
e!er% case must end with a break statement
-
7/26/2019 Java June2013 Paper2
3/6
Choi
ce d
e!er% case label ollows with a-?@$& with respect to !ariable in Aa!a
Choice
a
? !ariable must be declared beore it is used in the program
Choice
b
? !ariable can be used to store an% data t%pe
Choice
c
(he place o declaration decides the scope o the !ariable
Choice
d
? !ariable name must be ma'imum +
[;] What is process o con!erting one data t%pe to
another
Choice a Con!erting
Choice b Changing
Choice c "eining
Choice d Casting
characters long
[6] (o print string on the
screen we use
$%stem8out8println8 What
is the correct
e'plaination or this
-
7/26/2019 Java June2013 Paper2
4/6
Choi
ce a
$%stem is a
class8println is
a method and
out is a object
Choice b
$%stem is aBbject8out is a
object and
println is data
member
Choi
ce c
$%stem is a
package out is
a method print
is a object
Choi
ce d
$%stem is a
pointer to
object out o
class println
] Which o the
ollowing is 1B(
true with respect to
Aa!a rogram
$tructure
Choi
ce a
Comme
nts can
be
gi!en
onl% at
the
beginni
ng o
rogra
m
Choi
ce b
ackage
stateme
nt
shouldbe
beore
class
deiniti
on
Choi
ce c
Import
stateme
nt
should
be
beore
-
7/26/2019 Java June2013 Paper2
5/6
class
deiniti
on
Choi
ce d
Interac
estateme
nt
should
be
beore
class
deiniti
on
[4] Aa!a is Multithreaded
@anguage, What
$tatement best e'plainsthis eature
Choi
ce a
Aa!a
application
need not
wait or the
application
to inish
one task
beore
beginninganother
Choi
ce b
Aa!a is
capable o
d%namicall
% linking in
D class
libraries,
methods
and objects
Choice c
Aa!asupports
unctions
written in
other
languages
such as C
and CEE
Choi
ce d
Aa!a uses
less amount
o memor%
in
-
7/26/2019 Java June2013 Paper2
6/6
en!ironmen
t
[5] Which o the ollowing is 1B( one o the web
browsers
Choice a Coldja!a
Choice b 1etscape
1a!igator
Choice c Internet &'plorer
Choice d Fotja!a
[2] In BB process b% which objects o one class
acGuire the properties o objects o another
class is
Choice a Inheritance
Choice b ol%morphis
m
Choice c &ncapsulation
Choice d ?bstraction
[] In BB approach programs are di!ided into
Choice a Bbjects
Choice b Method
s
Choice c >unctio
ns
Choice d rocedu
res