( Printed Pages : 3 )
Ro ll No ... .. .. .............. ..
AC-1942
B.E. IV Semester (N'ew Course) Examination,
May-2022
OOPS USING JAVA
CSE,ECE
Time: Three Hours J ( Afaximum Marks : 60
1l1i11imum Marks : 24
Section - A (All questions are c~mpulsory-objective Type/True & False)
lx10=10·
Section - B (Four Questions are co1np ulsory out of Six) 5x4=20
Section - C (Three Questions are compulsory out of Five) 10x3=30
Sed:ion-A
. 1. An expression involving byte, int, 21 nd literal nu m be 1·s is promoted to which
of these?
~ int (b) long
(c) byte (d) f1oat
2. Which of the following option leads to t he portabil ity and security of Java?
.W Byte code is executed by JVM
(b) The applet makes the Java code secure and portable
( c) Use of exception handling
( d) Dynamic binding between objects
3. What is t rue about private constructor?
4 Private constructor ensures only one in st ance of a class exist at any
point of time
(b) Private constructor ensures mult iple instances of a cla ss exist at
any point of time
( c) Private constructor eases t he inslantiation of a class
( d) Private constru ctor al lows crcati n~J objects in other classes
P.T.O.
.y \
4. What would be the behaviour if this() and super() used in a meth ud 7
(a) Runtime error £J;r) Throws exception (D
@ (c) O:>mpile time error (d) Runs successfully L.
5. What is the process of defin(ng more than one m ethod in a cl ass differen-
tiated by method signature?
j,91 Function overriding ,~ ction overlo adin g
(c). Function doubling · (d) None of the me nti oned
6. Which of these is correct way of call in g a constructor hav ing no para me-
ters, of superclass A by subclass B?
(a) Super (void); tb-f Superclass(); @) .fa.
(c) Super.A(); (d) swper();
7. Give the abbreviation of AWT?
Applet Windowing Toolkit
(b) (6§ct Wi·n dowing To~ 1.
(c) Absolute Windowing Toolkit
( d) None of the above
I 2.
8. Which object can be Constructed to show any number of choices in the
visible window?
3.
(a) Labels (b) Choice
(c) List ( d) Check box
4.
9. vVhich are passive controls that do not supp ort any ;n tcracti on ·11ith t he
user?
(a) Choice J,B') List
(c) Labets (d) · Checkbox 5.
10. Which of these keywords is us~d to by the calling fu nction to guard aga inst
the exception that is thrown by cal led f unction?
(a) try
~
(c) ~~
©
(d) ca tch
AC-194 2 (2)
AC-
Sect ion-B
Y Ex pla in abbu t Fundamentals of Obje ct-ori ented Prog ramm
ing Lang ua ge .
2. Expla in the differ ent visibi lity controls (mod ifiers ) and
also comp are wi th
each of them with suitable example.
), Defin e an interface. What is the need for an,en terfac e?
4. What is container? What are the differ ent types of comp
onen ts in AWP
Write a program in java to create differ ent comp orien t?
qnd add them into
a contai ner.
/->- What is an exception? What do you unde rstan d by
chec ked and Un -
check ed exception?
)is. What are constructors? Explain differ ent types of cons
truct or with exam -
ple.
Section-C
1. What is objec t casting? How it can be achieved? Ment
ion the diffe rent
•
rules to type cast an object. Demo nstra te objec t type
casti ng with suit-
able java program .
2. What is an Applet? How it differs from an Application? Expla
in life cycle of
an Applet. Write a code in Java to demonstrate the life
cycle of an Appl et.
3. Explain life cycle of a thread with the help of diagr am. Write
a code in java
to demonstra te the life cycle of a threc1d.
4. Expla in the following terms with suitable exam ple:
(a) r l3in'"\inJ';:1
\_, I
,., ':ln o v r!::iinti nn
. 11111~ UII '-A..._,,._. t-'\..IUI J
(b) t hrowing an exception
( c) catching an exception
5. What is an event? How event~ i\re handled? Write the proce
dure to hand le
a button click even twith prop€ r prograrnmihg. synta x
in java.
AC-1 942 (3)