Examination Paper
Subject Code: DIT-491
FACULTY OF TECHNOLOGY
BCA - SEM IV (CBCGS) April/May 2025 Examination
Subject: Core Java
Time: 1 Hour 30 Minutes
Max Marks: 40
Note:
1) All questions are compulsory.
2) All questions carry equal marks.
Q1. Multiple Choice Questions:
1) Which of the following is a valid declaration of an object of class Box?
a) Box obj = new Box(); b) Box obj = new Box; c) obj = new Box(); d) new Box obj;
2) Which of the following is a method having same name as that of its class?
a) finalize b) delete c) class d) constructor
3) What is the numerical range of a char data type in Java?
a) 0 to 256 b) -128 to 127 c) 0 to 65535 d) 0 to 32767
4) Which of these are selection statements in Java?
a) break b) continue c) for() d) if()
5) Which of these operators is used to allocate memory to array variable in Java?
a) Malloc b) Alloc c) New d) New malloc
6) Which of the following is a type of polymorphism in Java Programming?
a) Multiple polymorphism b) Compile time polymorphism
c) Multilevel polymorphism d) External time polymorphism
7) What is the return type of Constructors?
a) int b) float c) void d) none of the mentioned
8) Which operator is used by Java run time implementations to free the memory of an
object when it is no longer needed?
a) delete b) free c) new d) none of the mentioned
Q2.
a) Explain different operators available in Java. (OR)
b) Explain if-else statement with suitable example.
Q3.
a) Define polymorphism. Explain function overloading with suitable example. (OR)
b) Write a program to demonstrate use of ‘object’ and class.
(OR)
Write a program to print reverse of a number.
Q4. Short Notes on any TWO of the following:
a) History of Java
b) Need of OOPS
c) Classes and object
d) Exception handling.
Q5.
a) Which all classes can be overloaded?
a) Constructors b) Methods c) None of the mentioned
b) What type of methods interface can contain by default?
a) abstract b) static c) private d) none of the mentioned