Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

CSF203_CS202 Introduction to Java Programming END TERM_22_Head BCA (1)

Java question paper

Uploaded by

purplehathacks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

CSF203_CS202 Introduction to Java Programming END TERM_22_Head BCA (1)

Java question paper

Uploaded by

purplehathacks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Subject Code: CSF203/CS202 Printed Page 1 of 2

DIT UNIVERSITY , DEHRADUN


B.TECH (CSE) : END TERM EXAMINATION, ODD SEM 2022-23 (SEM III)
Roll No.
Subject Name : Introduction to Java Programming
Time: 3 Hours Total Marks: 100
Note: All questions are compulsory. No student is allowed to leave the examination hall before the completion of the exam.
Subject Code: CSF203/CS202
______________________________________________________________________________________________________
Printed Page 2 of 2

Q.1) Attempt all Parts : BT CO


L
(a) What is JVM? Give importance of JVM in java language. 1 1

(b) What is importance of super and this keyword in inheritance? Illustrate with suitable 2 4
example.
(c) Define a class with name Student with suitable data members. Create two objects using 3 4
two different constructors of the class.
(d) What is the difference between an interface and an abstract class? Explain with an 3 4
example.
[4 x 5= 20]

Q.2) Attempt all Parts : BT CO


L
(a) Explain various access specifiers supported by Java with an example. 2 1
(b) Write a step to declare and define two and three dimensional arrays of a class. 1 2

(c) Write short note on the following Object Oriented concepts: 2 4


i) Encapsulation ii) Polymorphism
(d) Why Java Strings are Immutable? Justify. 2 4

[4 x 5= 20]

Q.3) Attempt any two parts : BT CO


L
(a) Write a program to define a class with name Employee with members as id and salary. 4 4
Accept data for five employees and display details of employee getting highest salary.
(b) Write differences between the following: 3 5
a. Method overloading and Method overriding.
b. Throw and Throws.
c. checked and unchecked exceptions.
(c) Write a program in java to search a given number in an array. 3 2
[2 x 10= 20]

Q.4) Attempt any two parts : BT CO


L
(a) Write a program to perform the following concept using classes, objects, constructors: 4 4
i) Read 5 subject’s marks of 5 students
ii) Calculate the total marks obtained by each students and print the result on the
screen.
(b) Write a Java program to find the area and perimeter of square and circle using interface. 4 5

(c) Write a java program to create own exception for Negative Value Exception if the user 4 5
enter negative value.
[2 x 10= 20]

Q.5) Attempt any two parts : BT CO


L
(a) What is an exception? Explain the class hierarchy of exceptions. Discuss the use of try, 3 5
catch and finally blocks. Can we have more than one catch blocks with one try block?

13. List any four


(b) 3 4

You might also like