210 Merged
210 Merged
210 Merged
ls
ea
R
G
@
OR
ir
,.- Explain all Java primitive data types in detail.
(b) Explain the concept of method overloading and constructor overloading in Java
ls
with an example.
OR
J\ (l ) Explain the use of 'this' keyword in constructor and instance variable hiding.
t\
\ (2) What will be the values of x, m and n after exeiution of the following
statements ?
R
int x, m, n;
m: 10;
G
n:15; p,fr5
. r\ td !.t
x :6+ fr)+ n,**;.
E-_rt€__
@
2. (a) Explain the operation of the append( ) and reverse( ) methods of the ShingBuffer
class with an example and also give the difference befween String and StringBuffer
class. 7
OR
How to create, declare, initialize and usea one-dgmensional array in Java ? {nd
also pxplajn the concept of pas_s by reference in conc_em with a one-dimensional
array with an example
t-
: xY-134 P.T.O.
:,
OR
Answer the following :
irit i :40;.
intj = 39,
int k:40;
ir
intl=i/k*2+j;
rntm:i/(kx2)ij;
ls
.
a
J. (a) ? Exprain th. 0i999:,-gteu,in*
#:itfrlT:;}!i#$4qng crsle'€ryqLiqn and
ea
7'
OR
keyw o rd
:#.T*1i
can throw thgll1 lifl:. I ltl^r.
exceq!.ion,in :i--with
JaVa, *any anexampi
' an d ar s o .ekp I ai n h ow a m etho d
---rj_-_
R
r.'
":e:-r;-:
(b) Explain the concept of
oian intert
an interface and also explaio ho*L
forachieving muLtipre inheritance i
an rnterface can be used
iniuuu",liir, ffiiffi[
G
OR
Answer the following :
4
(2), Differentiate between abstract class :
and interface.
3
::OR \
(l) what do you mean by package ? Explain
how can we create user defined
package and how *" u"."r" it.p4pgrin witt *
"- . 4
(2) Discuss the different ways in
wtrictr u rt r"ua can be
"*u,npt"
in
"r"ur"o
Java. ;
xY-l34
OR
li
5. Answer the following : l4
(a) java
ir
(c) jurrup (d) javadoc
(2) After the successful compilation of a Java plogram, bytec.odes ar.e conta.ingd in
ls
file. :
variables i
-
R
(c): private (d) illegal
. l:j
(4) If String mouib : new String([gsl Sidq Story!);,the value of moyie.inpexO{' 1')
is.-/+
G
Ir/,
(5) - operator is used to create-an atray.
(7) ln java, Throwable is the parenJ class for all Exception and Error classes.
lTrqe / False]
xY-l34 P.T.O.
ir
l
main( method for execution tlrue
(12) An apprer requlres
)
::::], -^^^
I executed by placing the tag in
#Ui
page'
be
ls
(13) An aPPlet c an
1
'
' --um
(ta) The mrilml PrioritY
of a thread is
(b) 5
(9 1
ea (d) zo
(c) 10
-€-
R
G
@
xY-l34
www.Realsir.in Instagram : @GRealsir
ir
ls
ea
R
G
@
SeatNo.r 95O
ZC.T22
April-2014
B.C.A., Sem.-fV
Cc.zrc CORE JAVA
Tine : 3 HoursJ
[Max. Marks : 70
ir
(4) Polymorphism
OR
ls
Explain the following terms :
ir
mechanism with example. ,
ls
(B) Describe following functions :
(1) drawReco
(2) showStatusQ +
(3) fillPolysonQ
ea
OR
Describe foiloyllg j$q&!q_:_ -_-.
ffl Ot"*Stri"gO
R
(2) join0
(3) sleep0
G
4. (A) Do as directed:
8
(1) Explain Thread priorities. ----r
q
(2) Give example of creating owned checked exception
@
ir
Cb) javac (d) java * ':,'
X2l An instance of class is a(n)
(a) Method (c)
ls
Object
(b) Constructor (d) Bytecode
(l! fne value 983.47 can be held by a variable of type
V (a) double (c) int
ea
.Q} float (d) All of above
G) llnt Z=97 >> 3. The value of Zis
(a) 94 (c) 13
(b) 7e Q) t2
R
(5) To convert "97'7" into integer value, function is used.
(a)j tolnteger0 (c) parselnt0
g- parselntegerO (d) tolntValue0
G
ir
Fl ThreadRunner
ktf) fo draw rectangle using Graphies in Applet,
(a) Java.net (c) Java.util
ls
, ? {b) Juuu.applet (d) Java.awr
Vt+l To draw circle in applet, function is used.
(*)-drawOval0 (c) drawCircle{)
(b)
ea
drawRoundRectangle$ (d) drawEelipse$
R
G
@
zc.t2L
AA-101
April-2019
BCA, Sem.-IV
CC-210 : Core Java
Time : 2:30 Hours] [Max. Marks : 70
ir
(ii) Write a short note on :
(A) Types of Operators 4
ls
(B) Method Overloading 3
OR
(i) Which Java features replace C++ in most of the application development ? 7
(ii)
ea
Write a short note on :
(A) Importance of JVM. 4
(B) Constructor and its types. 3
(B) Do as Directed. (any four out of six) 4
R
(i) Which of the following is not an object-oriented language ?
(A) Simula (B) Java
G
ir
(i) "Multiple values can be passed to and returned from method using array."
Explain with suitable examples. 7
(ii) Write a short note on:
ls
(A) Interface extending 4
(B) Method Overriding 3
ea OR
(i) What is inheritance ? What are its types ? 7
(ii) Write a short note on:
(A) Difference between Abstract class and Interface 4
R
(B) Command-line arguments 3
(B) Do as Directed. (any four out of six) 4
(i) Which statement from the following is correct ?
G
AA-101 2
ir
3. (A) Write the following:
(i) Draw Access Protection chart. Explain its use inside and outside package
ls
with example. 7
(ii) What is multi-catch in exception handling ? Explain with example. 7
OR
(i)
ea
What is wrapper class ? Explain any two with suitable examples. 7
(ii) Explain user defined exception with example. 7
(B) Do as Directed. (any three out of five) 3
(i) ______ must be included at the top of every java source file.
R
(A) import (B) impact
(C) inherit (D) package
(ii) What is the result of compiling the following code: package pkgl .pkg2;
G
AA-101 3 P.T.O.
ir
(C) java.Object (D) Java-package
(ii) Once a thread is created, it enters into __ state.
ls
(A) Ready (B) Running
(C) New (D) Run
(iii) _____ has same values for starting and ending co-ordinates.
(A)
ea
Polygon (B) Polyline
(C) Polyrectangle (D) Ploycircle
(iv) ______ is the method of an applet.
(A) init( ) (B) display( )
R
(C) execute( ) (D) None of the above
(v) ______ class has methods to draw graphical symbols on the applet.
(A) Drawing (B) Graph
G
AA-101 4
I.
(3) Question -
5 in Section -
II is compulsory.
r
Section-I
si
1. (A) What is Operator ? Explain Binary and Unary operator. 10
(B) What is Loop ? Explain types of loops with syntax and example. 10
2. (A)
al
Explain types of inheritance and differences of interface and abstract class. 10
10
(B) What is Array ? Explain type of array in detail.
re
(A) What is Package ? Explain creating and using packages with example. 10
3.
(B) What is Exception ? Explain exception handling techniques with example. 10
G
java. 10
creation of new threads and state of thread in
4. (A) Explain
of applet. 10
Explain hierarchy and life cycle
@
What is Applet ?
(B)
Section II
10
5. MCQs: (Any five)
(1) JDK stands for
(B) Java Designer's Kit
(A) Java Development Kit
(D) Java Definition Kit
C) Java Developer's Kit
action on three operands is called_
(2) An operator that performs an
r
(6) What is the extension of the source files in Java ?
si
(A) jav (B) java
(C) .bytecode (D).class
(7) Which type
(A)
al
of exception docs sleep() method
a throw?
Arayindex out of bounds exception
re
(B) Arithmetic exception
(C)Interrupted exception
G
AP-101