<br>
MAY 2025
407/5(N)
OBJECT ORIENTED PROGRAMMING USING JAVA
Time Allowed: 2.5 Hours
Full Marks: 60
Answer to Question No. 1 of Groun A must be written in the main answer
In Question No. 1,out of 2 marks for cach MCO, 1 mark is allotted script.
for right answer and 1 mark is allotted
for corrcct explanation of the answer.
Answer any Five (05) Questions from Group-B.
GROUP-A
1. Choose the correct answer from the given alternatives
and explain your answer (any ten): 2x10=20
i) What does the JAVA Runtime Environment
(JRE) include?
a) Java Compiler only
b) Tools for Java application deployment
c) Integrated Development Environment (IDE)
d) Java Virtual Machine (JVM), Java class libraries and
the Java class loader.
ii) Which of the following is not a java feature?
a) Use of explicit pointers b) Robust c) Distributed d) Portable
iii) Which of the following type of inheritance,
java does not support?
a) Multilevel b) Hierarchical c) Single d) Multiple
iv) Which of the following keyword is used for implementing an
inheritances in Java?
a) implements b) extends c) super d) None of these
v) Which is of the following is a valid declaration of an object obj
of class Room?
a) Room) obj = new Room); b) Room obj = new Room);
c) Room obj = new Room; d) obj = new Room);
vi) Which of the following keyword is used for implementing an interface
in Java?
a) implements b) extends c) final d) None of these
vii) Which keyword is used for accessing the features of a package?
a) export b) package c) import d) extends
viii) Which of the following modifiers can not be used for constructor?
a) private b) public c) static d) protected
ix) Which of the following is not an access modifiers ?
a) void b) public c) private d) protected
x) What is the extension of compiled java classes?
a) .java b).class c).txt d) .obj
xi)) What is the number of bytes used by java primitive data type
boolean?
a) 1 b) 4 c) 8 d) 2
xii) Given a onc dimcnsional array arr, what is the correct way?
of getting its number of clements?
a) [Link] b) [Link]-1 c) [Link] d) [Link]-1
xiii) Which of this not a built in package?
a) [Link] b) [Link] c) [Link] d) All of these
xiv) Which of the following is a mutable class in Java?
a) [Link] b) [Link] c) java,.[Link] d) [Link]. StringBuilder
64- 4965
<br>
x) Which of these class is uscd to rcad and write bytcs s in a file?
a) FilcRcader b) FileWriter c) BytcStream d) InputtrcamReader
GROUP-B
Answer any Five (05) questions.
a) Explain any three features ofjava-programming. 4+2+2
b) What do you mcan byte code?
Why java is not considered as a completely object-oriented programming language?
3. a) What is type casting? Explain its types with proper syntax and example. 3+2+3
b) What do you understand by Garbage Collection?
c) Write a java code tofind the sum of digits of a number.
4
a) Define class and object with example (2+2)+4
b) Explain the meaning of each word of the following line:
public static void main(String args [])
$. a) Explain Constructor. 3+3+2
b)Write a Java Code to implement constructor overloading
c) State the purpose of using final keyword with example
6. a) What is inheritance?
b) Write a Java Code to implement multilevel inheritance. 1+4+3
c) Differentiate between method overloading and method overriding.
7. a) What is meant by interface? 1
+4+3
b) Write a java code to. implement multiple inheritance using interface.
c) Write the difference between interface and class.
8. a) Define package with example.
b) Explain try, catch and throw block used in java Exception Handling. 2+6
9. a
State different types of errors. 2 +4 +2
b) Describe thread synchronization in respect to multithreading.
c) Define thread priority.
10. a) Define stream class. b) State the classification of stream classes.
C) Write a java program to create and read text file. 1+2+5