210 Merged

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

ir

ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


E-
'/ rJcft'' SfM 14

ilililllrililililllilil]t Seat No. : I bq6_


xY-134
B.C.A. Sem.IV
April-2013
.
CC-210 Core Java
Time: 3 Hoursl [Max. Marks :70
\

1. (a) List and explain any three Java features in detail.

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

Answer the following


ea :

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.
:,

www.Realsir.in Instagram : @GRealsir


' .: --r''

(b) List out the nameg ur


of wrapper
wrappor classes
classes and explain I{eger
;il; .;il.= wrapper class in detgil

OR
Answer the following :

(1) Explain how to use binarySearch(


-q\ ) and )."thods of an Arrays class.
@ phat will be the values of I -$(
and m after execution of the following
statements ? I

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 :

(1) Explain the use of 'super' keyword


i' java with an example.
@

4
(2), Differentiate between abstract class :
and interface.
3

4. (a) Wtrat is Multithreading ? Explain


Thread life cycle

::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

www.Realsir.in Instagram : @GRealsir


(b) What ig an applet ? Explain the life cycle of an applet 7

OR

List and explain attributes of the <Applet? tag. 7

li
5. Answer the following : l4

(1) JDK tool is used for c*qmpili gg a j av a pro gram.

(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. :

. (e) .java Q) .class


(c) .obj
ea (d) .exe
(3) Variables thai are shareq bJ gve5{ ir,rstange of a cl.ass il"
(a) class variables Q) public variables

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.

(6) Wrapper classes are defined in thb package.


@

-(a) java.util ----.---r-


(b) java.lang

(c) java.net (4) java.awt

(7) ln java, Throwable is the parenJ class for all Exception and Error classes.

lTrqe / False]

(8) When an interfacer method is implemented in a class, it must be declared

(a) public (b) private

(c) protected (d) None of these

xY-l34 P.T.O.

www.Realsir.in Instagram : @GRealsir


' $s can't be instantiated' [True / Falsel
(9) An abstract ctt
,^ :.^^+^nnP rTle;tno(I (JI urv vror'
class.
) method is an rnstanc.
(10) rhe drawoval(
(t)
;;tTrj|rlt
GraPhics -
is used to setthe
n:ame *^1*:1U '
(11) The
-*--u=me'thod (b) isAliveo
(a) getName( )
(c) setNameo

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
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


T

SeatNo.r 95O
ZC.T22
April-2014
B.C.A., Sem.-fV
Cc.zrc CORE JAVA
Tine : 3 HoursJ
[Max. Marks : 70

1. (A) Explain the following renns :


I
, (1) Bytecode U
ts\
h

(2) Type casting


(3) Static Keyword

ir
(4) Polymorphism
OR

ls
Explain the following terms :

(1) Wrapper class


(2) Constant
(3) Finalizs Function
ea
--'<.. _ JA,*S. wirch Keyword
--'*-i*^:!

(B) Explain the characteristics of Java language.


_q
R
OR b
<-J
Explain Java architecture with figure.
G

J (A) Answer the following questions :


I
(1) List Methods of graphical dialog boxes of Joprionpane.
(2) Differentiate between Method vs. Constructor. 1
@

(3) Differentiate between Applet vs. Application.


(4) How StringBuffer is betrer than String ?
-OR./
Answer the following nuard6* ,

(1) Explain Logical operators.


(2) Differentiate between equals vs. (- =;.
(3) Differentiate between Abstract vs. Final.
(4) Explain Java comments.
zc-ttz P.T.0.

www.Realsir.in Instagram : @GRealsir


f
(B) write short note on Looping statements with examples.
OR
write short note on different types of Java arrays with exampres.

3. (A) Answer the following questions :

(1) Explain different states of rhread rife cycre with figure. -g


(2) what is package ? what are their types ? why we need package ? Explain
6
with example.
OR
Answerlhe following questions : _-

(1) what is interface ? what *) ir, characteristics ? why we need it ? Give


example.
(2) 'whT is exception ? what are their rypes ? Explain exception handling

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
@

(3) Define keywords : (1) Try (Z) Carch


(4) Applet class hierarchy
OR
Do as directed:
(1)" List any five anributes of <AppLET> tag.
(2) Identify functions: gerDocumentBase0 and getcodeBase0.
(3) ArithmeticException class hierarchy
(4) What do you mean by abstract functions ?
zc-122

www.Realsir.in Instagram : @GRealsir


(B) Answer the following questions :
--o.-^.:_
I
(1) What is inheritance ? What is "extends', keyword does ? List advanru*", offi
using Inheritance.
(2) What are the access modifiers in Java language ? What do you mean by
default modifier ?
OR
Answer the following questions :

(1) What is interface ? what is "implements" keyword does ? List advantages of


using Interface.
(2) Explain different functions of Applet life cycle. 4

Fill in the blanks : t4


{9 Th" command to execute a compiled Java application is
(a) exec (c) appletviewer

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

6X The super keyword references


(a) To Local class (clWfo Child class
($
@

To Parent class (d) To Object class


To count elements in array, is used.
L9^
(a) Capacity Length
(b) ..{9-
Size (d) Elements
,\/(8)/ valid declaration of six boolean elements array
a
boolean b[] = new . (c) boolean b = new
Ky
boolean[6] boolean[6]
-is
(b) boolean b[6] (d) boolean [] b = new
boolean(6)
zc-tu2 3 P.T.O.

www.Realsir.in Instagram : @GRealsir


(9) block handles the ttrrown exception.
(a) Finally (c) Throw
(b) Catch (d) Throws
The code within a finaUy br.trck esecures when
SP fhe try biock
(a) trdentifies one or more exeeption
(b) Does not identiff any exceprion
{c) Identify any runtime exceptions
Jd) A.ll of above
,t{11) Abstract class does not have
,1g$_ Insranriarb Object (c) Child elass
(b) Parent class (d) Constructars
{p} AThread is created by implemenring .-. interface.
&_ Runnable (c) Throwable
(b) fhread

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

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


Seat No. : _______________

AA-101
April-2019
BCA, Sem.-IV
CC-210 : Core Java
Time : 2:30 Hours] [Max. Marks : 70

1. (A) Write the following :


(i) Explain the principles of Object-Oriented Programming Languages. 7

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

(C) C (D) C++


(ii) Which command is used to interpret a Java program file ?
(A) java (B) javac
@

(C) javap (D) javadoc


(iii) Which property from the following is correct for constructors ?
(A) can not be inherited
(B) an <init> method implicitly created
(C) Default is inbulit
(D) All of the above
(iv) Which of these statement is valid ?
(A) short s1 = 143; (B) int jl = '3';
(C) double dl = 6.3; (D) float fl = 4.3;
AA-101 1 P.T.O.

www.Realsir.in Instagram : @GRealsir


(v) To perform bitwise ORing, _______ operator is used in Java.
(A) & (B) !
(C) ~ (D) |
(vi) Which of the following is true for class product ?
(A) new product()
(B) new product(product s)
(C) new product(int pno, String pname)
(D) All of the above

2. (A) Write the following :

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

(A) int m[ ] [ ] = new int [5] [5];


(B) int [ ] m [ ] = new int [5] [5];
@

(C) int [ ] [ ] = new int [5, 5];


(D) None of the above
(ii) _____ variables and methods are allowed in static method.
(A) only static (B) only non-static
(C) static and non-static both (D) static, non-static, final, abstract
(iii) Which of the following keyword allows deriving members from another
class ?
(A) extends (B) implements
(C) derives (D) inherits

AA-101 2

www.Realsir.in Instagram : @GRealsir


(iv) Child class method hides execution of parent class method is an example
of _________
(A) overloading (B) loadingover
(C) overbiding (D) overriding
(v) ______ does not permit parent class members to be used further into child
classes.
(A) super (B) this
(C) final (D) Final
(vi) ______ inheritance for classes is not available in Java.
(A) simple (B) multiple
(C) unique (D) hybrid

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

(A) compile time error (B) runtime error


(C) compile but no execution (D) compile and execution
@

(iii) ______ is the immediate parent class of all exceptions in Java.


(A) Exception (B) Throwable
(C) Throw (D) Catch
(iv) ______ is always specified after method that does not catch the exception it
throws.
(A) throw (B) throws
(C) finally (D) new
(v) Which of the following statement will not generate exception ?
(A) z = x/0; (B) int a[] = new int[5];a[5]=5;
(C) a= 10; try{ a = 20;} (D) None of the above

AA-101 3 P.T.O.

www.Realsir.in Instagram : @GRealsir


4. (A) Write the following :
(i) Which are the two ways of creating threads ? Explain with examples. 7
(ii) List methods of Graphics class in applet and explain any two with an
example. 7
OR
(i) How Java provides multithreading concept to reduce overall execution
time ? 7
(ii) Draw Applet Life cycle and explain with suitable example. 7
(B) Do as Directed. (any three out of five) 3
(i) Which package contains all methods and variables of multithreading ?
(A) java.thread (B) java.lang

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

(C) Graphics (D) Image


___________
@

AA-101 4

www.Realsir.in Instagram : @GRealsir


Seat No.: 2 6
AP-101
April-2022
BCA, Sem.-IV
CC-210 : Core Java
Time: 2 Hours
Max. Marks : 50
Instructions: (1) All Questions in Section I carry equal marks.
-

(2) Attempt any Two questions in Section -

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

(B) Temary Operator


(A) Unary Operator
(D) None of Above
(C) Binary Operator P.T.O.
AP-101 1

www.Realsir.info Instagram : @GRealsir


(3) Which is the keyword used for deriving classes?

(A) implements (B) throws


(C)extends (D) inherits
(4) The parent class of all the exceptions in Java is

(A) Exception (B) Throws


(C) Throw (D) Throwable
(5) What is the name of the tool that is used for
compiling a Java program ?
(A) javac (B) javap
(C) java (D) javah

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

(D) Nullpointer exception


(8) Which class provides the functionality to draw different shapes ?
@

(A) Line (B) Shapes


(C) Graph (D) Graphics
(9) Which method implicitly calls paint ?
on an
applet
(A) repaint (B) paint
(C) callPaint (D) None of above
(10) Which operator is used to perform bitwise inversion in Java?
(A) (B)
(C) & D)

AP-101

www.Realsir.info Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir


ir
ls
ea
R
G
@

www.Realsir.in Instagram : @GRealsir

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy