Question Bank
Name of Subject: Java Programming (JPR)
Subject Code: 314317 Semester: IV
Chapter 1: Basic syntactical constructs in java
2 Marks
1 Write all primitive data types available in java.
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 Enlist any two bitwise and logical operators.
7 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
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.