0% found this document useful (0 votes)
174 views3 pages

JPR 314317 QB1 200125

The document is a question bank for a Java Programming unit test covering various topics including basic syntax, inheritance, interfaces, exception handling, and multithreading. It contains questions categorized by marks, ranging from definitions and syntax to programming tasks and explanations of concepts. Each chapter includes a mix of theoretical and practical questions designed to assess students' understanding of Java programming principles.

Uploaded by

Anjali Sable
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)
174 views3 pages

JPR 314317 QB1 200125

The document is a question bank for a Java Programming unit test covering various topics including basic syntax, inheritance, interfaces, exception handling, and multithreading. It contains questions categorized by marks, ranging from definitions and syntax to programming tasks and explanations of concepts. Each chapter includes a mix of theoretical and practical questions designed to assess students' understanding of Java programming principles.

Uploaded by

Anjali Sable
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
You are on page 1/ 3

Question Bank (K scheme)

Name of Subject: Java Programming (JPR) Unit Test: I


Subject Code: 314317 Course: CM4K/IF4K
Semester: IV

Chapter 1: Basic syntactical constructs in java (12 marks)


2 Marks
1 Write all primitive data types available in java with their storage size in bytes
2 Write down the syntax of array declaration, initialization.
3 Define term token and enlist types of tokens in java
4 Write syntax and example for-each.
5 Explain the difference between String and StringBuffer.
6 Describe instanceOf and dot (.) operators in Java with suitable example.
7 Enlist any two bitwise and logical operators.
8 What is Object? How to create it? Explain with Example.
4 Marks
1 Explain any four features of java.
2 Write a program to accept marks and find grade using if statement.
3 Describe concept of type casting and explain its types with proper syntax and example.
4 State & explain scope of variable with an example.
5 Write a program to accept a character and check whether a character is vowel or
consonant using switch-case statement.
6 Write a program to copy all elements of one array into another array.
7 What is method overloading and constructor overloading? Give examples.
8 Explain the significance of garbage collection in Java. How does it contribute to memory
management?
9 Write a program to print all the Armstrong numbers from 0 to 999.
10 Explain visibility controls in Java.
11 Compare Array and Vector.
12 Write a program to check the entered string is palindrome or not?

6 Marks
1. Describe the use of any methods of vector class with their syntax.
2. Explain the command line arguments with suitable example.
3. Write a program to print the sum, difference and product of two complex numbers by
creating a class named “Complex” with separate methods for each operation whose real
and imaginary parts are entered by user.
4. What is constructor? List types of constructors. Explain parameterized constructor with
suitable example.
5. Explain vector with the help of example. Explain any 4 methods of vector class.
Chapter 2: Inheritance, Interface and Package (12 marks)

2 Marks
1. Define inheritance. List types of Inheritance with suitable Example.
2. List the Uses of keywords 1. final 2. this 3. super
3. List any four built in packages in java.
4. Describe concept of package and its syntax.
5. Define syntax of abstract class and method.

4 Marks
1. Write the three uses of final keyword with suitable example
2. What is Interface? Describe syntax, feature & need of an interface
3. Write a single program to implement inheritance and polymorphism in java.
4. Develop a program to find area of rectangle and circle using interfaces.
5. Explain how to create a package and import it with suitable example.
6. Differentiate between method overloading and method overriding.
7. Describe concept of multiple inheritances? Write a java program to implement multiple
inheritance
8. Develop a program to implement the multilevel inheritance.
9. Explain method overriding with suitable example.

6 Marks
1. Develop an Interest Interface which contains simple interest and compound interest
methods and static final field of rate25%. Write a class to implement those methods.
2. Write a program to implement following inheritance.

3. Write a program to implement following inheritance.

Interface: Class: Employee


Salary name, age
basic_sal display()
basic_salary()

Class: Employee
name, age
display()
Unit 3- Exception Handling and Multithreading (12 marks)

2 Marks
1. Define concept of Exception?
2. Enlist any four-compile time error.
3. Define thread. Mention two ways to create thread.
4. Write steps to create a thread using Runnable interface.
5. Describe thread priority.
6. Describe use of throws with syntax and example.
7. Define the term: i. Thread ii. Exception

4 Marks
1. Explain the following clause in exception handling.
a. try b) catch c) throw d) finally
2. Describe the life cycle of thread with suitable example
3. Write a program to create user defined exception in java.
4. Write a java program in which Thread A will display the even number between 1 to
50 and thread B will display the odd numbers between 1 to 50. After 3 rd iteration
thread A should go to sleep for 500ms.
5. Differentiate between throw and throws
6. Differentiate between Multithreading and Multitasking.

6 Marks
1. Develop a program to accept a password from the user and throw “Authentication
Failure”
2. Write a program to create two thread one to print odd number only and other to print
even numbers.
3. Define an Exception called “NotMatchException” that is thrown when a password is
not equal to “MSBTE”. Write the program.

You might also like