You are on page 1of 4

Sent No.

AK-l1{}
April -2018
B.C.A., Sem.-IV
CC-210 : Core Java

Time: 3 Hoursl lMax. Marks :70

1. (A) Answer the tbllowing questiotrs : I


$ Which are the l.eatures offered by Java 'l Discurss in ci*r ,,'
What is thr: ,,sr' .,f JOptionParre class iu .lava tbr GUI output 'l Give an
tg
exarnl;lc
OR
Answer the l,iiir ',lllg questiorts :
(i) With suitable Java code, explain the tbllowing:
(a) conrparisotroperators
(b) bitwise operators
(ii) How GUI Input is ot1bred in Java'J Explain with exarlple.
(B) Answer the following qulestions : 6
(i) Which rules must be followed firr static methods ? Explain u,ith Java cocle.
(ii) Detlne the below mentioned tenns used iu Java:
(a) variables
(b) block and scope
(c) Boolean Data'Iype
OR
Answer tlre tbllowing questicns :
<{ Wliat is constructor overloading'l Write Java cciiu i,.; irnplementation of it.
{+n Deture the below mentioued tenns used iu Java:
(a) Literals
(b) 'this'keyword
(c) Floating Point Data Type

2. (A) Answer the tbllowing questions :


(i) Diffbrentiate "Nested if'and "Nested switch".
(ii) Write a Java code to represent "nested loop" for the below mentioned
outPut:
{<rr***
{<*{<{<
**rr
**
*
OR

AK.t l0 I P.T.O.
Answer the following questions :

{*Y Diff'erentiate "Entry control loop" and..Exit control !oop".

W Write a Java code to represent logical AND, OR and NOT *i:reratr.irs"


(B) Answer the following questions :

*n Explain with Java code : "Creating array to store narnes of l0 countri*',"


1;:0 List rnethods of String class and explain any two with an example
OR
Answer the fbllowing questions :

(i) Explain with Java code: "Displaying Array elements befbre and atter
sorting using suitable method of ,Arrays, Class".
(ii) List various wrapper classes and explain any two with an example.

3. (A) Answer the tbllow,ing questions :

(i) "Exception Handling overcomes the limitations of traditional effor


handling."
- Do you agree ? Support your answer u,itli suitable Java code.
(ii) What is the use of 'super' keyw,ord rvhile extending classes '] Give suitable
example illustrating it.
OR
Answer the fbllowing questions :

kf Is "Creating your owtt Exception" possible in Java 'l If yes. erplain u.ith
your own Java code.

l4T Which are the lirnitations of Method ovemicling while creatipg der! ,-,-i
class(es) ?

(B) Answer the following questions :

(i) What are the characteristics of Abstract class ? Write Java code to explairr
its implernentation.
(ii) What sequence will be followed by constructors in multi-level inheritance'l
Write Java code to support your answer.
OR
Answer the following questions :

.$f How intertlces supporl the concept of multiple inherit;:;rce in Java '] With
suitable Java code, explain its implementation.
what is the unique feature of 'finally' block in cxceprron handling ? why it
is useful in Java'l

.,
AK-l10
4. (A) Answer the fbllowing questions : g
(i) Draw and explain Thread Life Cycle.
(ii) Draw Access protection Chaft and explain.
OR
Answer the tbllowing questions :

kf What is package'? Explain any three Built-in **.ckages.


\itf How to deal with Thread priority ? Explain,
(B) Answer the following questions : 6
-0a' Draw Lif-e cycle of an Applet and explain its phases ip tletail.
(ii) Why it is required to import a package ? Explain with proper Java code.
OR
Answer the following questions :

yf List various methods of Graphics class and explairr any trvo methocls with
suitable example.

lfi why sleep0 method is used in multi-threading ? Explain.

5. Do as directed : 14
tU' Con-rplied Java code is executed by
-.-.- cornmand.
(a) javac (b) appletviewer
(c) java (d) None of the above
.t2) Single line comment can be added in java code using
(a) /t (b) r..... *t
(c) I @) Any of the above
,6) A keyword that ret'ers to parent class nrember is
_--.
(a) this (b) super
(c) pointer (d) None of the above
t4\ Operators like >,<,!:,:: are called as _--
(a) Relational operators (b) Temary operators
(c) Assignment Operators (d) Increment / decrement operators

(a) isBinary0 (b) isDigitO


(c) isBit0 (d) isletterorDigit0
,,
-t|l Which of the following is Wrapper class ?
(a) Short (b) Character
(c) Double (d) All of the above
AK-l l0 3 p.T.O.
{aJ What is the output of the tbllowing code segment')
String s : "u_,_"1 int counFl;
while(count<:3)
,f
I

System.out.print(count+s); count:coutit+l :

l.
I

(a) count_,_ count*,_ count_,_ (b) t_,]_,_3


(c) count-l-count-2-count-3- (d) 1:J_,_3_,_
(r) Runtime Exception is part of the type _.
(a) Checked Exception (b) UncheckedException
(c) NotCheckedException (d) None of the above
(9) Valid method to search a value in Anay using Arrays class is
(a) binSearchQ (b) searchBinaryQ
(c) binarySearch0 (d) None of the above
(|O) Super class constructor is called tbr execution the child class
constructor.
(a) before (b) after
(c) parallel to (d) None of the above

,1.J.1) Which of the following(s) is prohibited for overriding in inheritance ?

(a) final class (b) tinal method


(c) static method (d) All of the above
1t7; nunnable is that is also used to run applet.
(a) class (b) interface
(c) object (d) None of the above
(tj) Which Access Modifier is visible in non-child class of other package'?
(a) default (b) public
(c) protected (d) All of the above
V4 To draw and fill color within a rectangle, the method is

(a) drawAndFillRect0 (b) drawRectFillRect0


(c) fillRect0 (d) fillRectangle0

AK-l10

You might also like