0% found this document useful (0 votes)
178 views4 pages

JPR Imp

Uploaded by

Anirudha Jade
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)
178 views4 pages

JPR Imp

Uploaded by

Anirudha Jade
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/ 4

Question Bank (I scheme)

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


Subject Code: 22412 Course: CM/IF4I
Semester: IV
Chapter 1: Basic syntactical constructs in java (10 marks)
2 Marks

1. Write all primitive data types available in java with their storage size in bytes
2. Define term class with syntax.
3. Define term token and enlist types of token in java
4. Describe conditional operator in java.
5. Write syntax and example for-each.

4 Marks

1. Explain any four features of java.


2. Describe concept of type casting and Explain its types with proper syntax and example.
3. State & explain scope of variable with an example.
4. Write a program to accept marks and find grade using if statement.
5. Write a program to accept a character and check whether a character is vowel or consonant using
switch-case statement.

PRACTICALKIDA.COM
6. Write a java program to display all the odd numbers between 1 to 30 using for loop & if
statement.
7. Write a program to display number 1 to 50 using do—while loop.

Chapter 2: Derived Syntactical Constructs in Java (18 marks)


2 Marks

1. Define term constructor with syntax.


2. Define term array with syntax.
3. Describe the concept of garbage collection.
4. State the difference between = = ,equals() and compareTo() method.

4 marks
1. Explain any four method of String with syntax and example.
2. Describe the visibility controls in Java with suitable example.
3. Write a program to implement different types of constructors to perform addition of complex
number.
4. Develop a program to print command line argument using for loop.
5. Explain any four method of Vector class with syntax and example.
6. Write a program to find largest number in array.
7. Write a java program to implement following functions of string : (1) Calculate length of string
(2) compare between strings (3) Concatenating strings
8. Describe the concept wrapper classes in Java and explain any one wrapper in detail with its
methods.
Chapter 3: Inheritance, Interface and Package (12 marks)
2 Marks
1. Define inheritance and its types.
2. State and use of super keyword.
3. State any two uses of final keyword.
4. Describe concept of package and its syntax.

4 Marks
1. What is Interface? Describe syntax, feature & need of an interface
2. Write a single program to implement inheritance and polymorphism in java.
3. Develop a program to find area of rectangle and circle using interfaces.
4. Write a program to implement user defined packages in terms of creating a new package and
importing the same.
5. Write a java program to extend interface assuming suitable data.
6. Describe concept of multiple inheritances? Write a java program to implement
7. multiple inheritance
8. Develop a program to implement the multilevel inheritance.
9. Explain method overriding with suitable example.
10. Develop a program which consists of the package named let_me_calculate with a class named
calculator and a method named add to add two integer numbers. Import let_me_calculate package
in another program (class named Demo) to add two numbers.

PRACTICALKIDA.COM
Question Bank (I scheme)
Name of Subject: Java Programming (JPR) Unit Test: II
Subject Code: 22412 Course: IF4I
Semester: IV
Chapter 4 : Exception handling and Multithreading (12 marks)
2 Marks

1. Define concept of Exception? Give different types of exception that could occur during runtime.
2. Write steps to create a thread using Runnable interface.
3. Describe thread priority.
4. Describe use of throws with syntax and example.

4 Marks

1. Explain the following clause in exception handling.


a) try b) catch c) throw d) finally
2. Develop a program to accept a password from the user and throw “Authentication Failure”
exception if the password is incorrect.
3. Write a Applet program to set background with red colour and foreground with blue colour.
4. Compare between Process-based Multitasking and Thread-based Multitasking
5. Implement multithreading to perform simultaneous processes.
6. Write a program to create two thread one to print odd number only and other to print even
numbers.

PRACTICALKIDA.COM
7. Define an Exception called “NotMatchException” that is thrown when a string is not equal to
“India”. Write a program that uses this exception.

Chapter 5: Java Applets and Graphics Programming (10 marks)


2 Marks

1. Describe any four attributes of <applet> tag.


2. Write syntax to create an object of Font class with example.
3. Give syntax of <param> tag to pass parameters to an Applet.
4. Describe with proper syntax and example of following Graphics methods:
i) setBackground() ii)setForeground()

4 marks
1. Explain Applet life cycle with suitable diagram.
2. How to pass parameter to an applet? Write an applet to accept Account No and balance in form
of parameter and print message "low balance" if the balance is less than 500
3. Explain the following methods :
(i) drawRect() (ii)drawPolygon (iii) drawArc() (iv) drawRoundRect()
4. Explain the following methods :
(i) drawLine() (ii)drawOval (iii) setColor() (iv) getParameter()
5. Define applet. Write a program to create an applet to display message “Welcome to java Applet”.
Chapter 6: Managing Input/Output/Files in Java (08 marks)
2 Marks
1. Define stream classes. List any two input stream classes from character stream.
2. Give any two methods from File class with their usage.
3. Write any two methods from Character Stream classes.
4. List the any two constructors of FileInputStream class and FileOutputStream class.

4 Marks
1. Develop a program to copy characters from one file to another.
2. Enlist types of stream classes and describe methods for reading and writing data for each types.
3. Develop a program to write bytes to a file.
4. Explain byte stream classes in detail.
5. Explain character stream classes in detail.

PRACTICALKIDA.COM

You might also like