0 ratings0% found this document useful (0 votes) 15 views2 pagesJava 2023
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
pihar Engincering Universit
End Semester Examination — 2023
love Beret. Semester. vp Time: 03 Hours
Ca assba” Subjects Introduction 110°% Programming Language Full Marks: 79
: 3 Introduction to Java Programming Language __ Pull Marks: 70
Instructions:=
(The marks are indicated i g
(Gi). There are NINE questions in this paper.
Gil) Attempt FIVE questions in all
iv) Question No. Tis compulsory
O17 Answer any seven question of the following : Bereta
(2) Which of the following provides a reuse mechanism? 5
a the right-hand margin,
(i) Abstraction (ii) Inheritance +
iii) Dynamic binding (iv) Encapsulation
(b) Which will legally declare construct and initialize an array? Ae
(i) int [] myList = {" V3 (ii) int [ ] myList = (5,8,2);"
(iii) int myList [ ] [] = (4,9,7,0}; (iv) int myList (E1437 ad
(©) What is the correct signature of the main method? es
(i) Public static void main (String{ Jargs)“ ~£
(i) Static public void main (String Jargs)
(iii) Public void main (String[ Jargs)
(iv) Both () and (ii) Fs
(@ Which keyword is used to inherit class?
(i) Inherit (ii) Extends+
a toe
(©) Which of these methods of thread class is used to suspends a thread for a period of time?
( Sleep, (i) terminate
Gi) Suspend Gv) Stop
(f) Identify the corrected. defintion ofa package
(i) A package is a collection of editing tools
(ii) A package is a collection of classes
(iii) A package is collection of classes and interfaces ,
(iv) A package is a collection of interfaces
(e) Which of tie following is tre about the anonymous inner class?
(i) thas only methods Gi) Object can’t be created
(iii) Tt has a fixed class name (iv) It has no class name
“Which option is false about the final keyword?
(i A final method cannot be overridden in its subclasses.
(i) A final classes cannot be extended.
(ii) A final class cannot extend other classes»
(iv) A final method can be inherited.
Injava, jar stands for.
(i Java archive runner (ii\lava Application Resource
(ii) Java Application Runner iv) None of the above
(Whats the use of the intern( ) method?
(@ Itretum the existing string from memory
(Gi) It creates a new string in the database
(ii) It modifies the existing in the database
iv) None of the above
Page 1 of2@)
ww
@3 «a
db)
Kap)
QP (a)
(b)
as”)
(b)
26 @)
©)
©
@
©)
8 (a)
(b)
9) Write
(a)
fb)
wo
@
jon? Write
What is construct "Java program to find the aFea of the cycle using
eontractor.
gram to Find IME FOTIA OF given yume using Recursion
Write a pe
Vow to handle multiple EH blocks for g nested try block? Explain with an
example :
Discuss a various AWT coM"3Iners with exam
Write the differences between Method overloading and method overriding with
suitable example of each
What are the characteristics OF JDBC? What are the various steps for using JDBC?
Write a programme to demonstrate these steps,
What are the various types Of exception available in java ? Also discuss on how
they are handled? ‘o
How packages differ from interface? Explain in with a suitable program
What is an applet? Explain its life eyele,
\Writean applet o display the mouse cursor postion in that Spplet window.
Explain about components in swings,
Write 2 java program to find the area and perimeter of square and circle using
interface
How to assign the value to the variable in the class atthe time of creation of object
to that class? Explain with example,
AY
What happen when print Writer tethod receiver a string type argument?
What are the problems with pioe€dure languages? How object oriented languages
overcome the problems of procedural languages?
short notes on any two of the following :
Copy constructor
Polymorphism
Java virtual machine
super’ and this’ keyword
Page 2 of 2
1
"1
71
Mm
aul
a
mI
7)
1
15]
(4
a
(71
Ul
v1
(7x2=14]