0% found this document useful (0 votes)
3 views2 pages

Java Paper 02_merged

The document is an examination paper for a Java Programming course at Government Polytechnic Bhojpur, consisting of multiple-choice questions, short answer questions, and programming tasks. It covers topics such as constructors, inheritance, exception handling, and multithreading. Students are required to answer all questions in Group A, two questions from Group B, and one question from Group C.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Java Paper 02_merged

The document is an examination paper for a Java Programming course at Government Polytechnic Bhojpur, consisting of multiple-choice questions, short answer questions, and programming tasks. It covers topics such as constructors, inheritance, exception handling, and multithreading. Students are required to answer all questions in Group A, two questions from Group B, and one question from Group C.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GOVERNMENT POLYTECHNIC BHOJPUR

Roll No:
[Time: 1 Hour] [Full Marks: 20]
Subject: Java Programming Semester : 4 th

Group (A)
Q.1 Answer all questions as directed. (1×6 = 6)
a) A constructor is used to ______.
(initialize object / delete object / print output / none)
b) Which keyword refers to current object?
(this / super / self / obj)
c) Which access modifier allows access within same package only?
(public / private / protected / default)
d) Which keyword is used to handle exceptions?
(catch / try / throw / all)
e) Which concept allows one class to acquire properties of another?
(polymorphism / inheritance / abstraction / encapsulation)
f) Java supports multithreading.
(True / False)

Group (B)
Attempt any TWO questions. (2×4 = 8)
Q.2 Explain constructors in Java (default and parameterized) with examples.
Q.3 Explain types of inheritance with suitable examples.
Q.4 Explain exception handling in Java using try-catch with example.

Group (C)
Attempt any ONE question. (1×6 = 6)
Q.5 Write a Java program to:
 Create a class
 Use constructor to initialize values
 Display output
OR
Q.6 Write a Java program to:
 Read a file
 Handle exception using try-catch
GOVERNMENT POLYTECHNIC BHOJPUR
Roll No:
[Time: 1 Hour] [Full Marks: 20]
Subject: Java Programming Semester : 4 th

Group (A)
Q.1 Answer all questions as directed. (1×6 = 6)
a) A constructor is used to ______.
(initialize object / delete object / print output / none)
b) Which keyword refers to current object?
(this / super / self / obj)
c) Which access modifier allows access within same package only?
(public / private / protected / default)
d) Which keyword is used to handle exceptions?
(catch / try / throw / all)
e) Which concept allows one class to acquire properties of another?
(polymorphism / inheritance / abstraction / encapsulation)
f) Java supports multithreading.
(True / False)

Group (B)
Attempt any TWO questions. (2×4 = 8)
Q.2 Explain constructors in Java (default and parameterized) with examples.
Q.3 Explain types of inheritance with suitable examples.
Q.4 Explain exception handling in Java using try-catch with example.

Group (C)
Attempt any ONE question. (1×6 = 6)
Q.5 Write a Java program to:
 Create a class
 Use constructor to initialize values
 Display output
OR
Q.6 Write a Java program to:
 Read a file
 Handle exception using try-catch

You might also like