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

Java Parctical Question

Uploaded by

samikshapatil775
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)
14 views4 pages

Java Parctical Question

Uploaded by

samikshapatil775
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

Sr.

No Experiment List
Name of student: Roll No: Gems No:
Batch:
Q.1

Implement java program to check given number is prime or not. Take number using
command line arguments.

Name of student: Roll No: Gems No:


Q.2 Batch:

Implement java program to find factorial of given number.

Name of student: Roll No: Gems No:


Batch:
Q.3

Implement java to print the area of a rectangle by creating a class named 'Area' having two
methods. First method named as 'setDim' takes length and breadth of rectangle as parameters
and the second method named as 'getArea' returns the area of the rectangle. Length and
breadth of rectangle are entered through keyboard

Name of student: Roll No: Gems No:


Q.4 Batch:

Java Program to demonstrate the use of the parameterized constructor.

Q. 5 Name of student: Roll No: Gems No:


Batch:

Write a Java Program to demonstrate the use of static variable, static block and static method.

Name of student: Roll No: Gems No:


Q.6 Batch:

Create abstract class shape with dim1, dim2 variables and abstract area() method. Class
rectangle and triangle inherits shape class. Calculate area of rectangle and triangle.
Name of student: Roll No: Gems No:
Q.7 Batch:

Create interface shape area() method. Class rectangle and triangle inherits shape class.
Calculate area of rectangle and triangle.

Name of student: Roll No: Gems No:


Q8 Batch:

Write a java Program for runtime exceptions- Unchecked Exceptions

Name of student: Roll No: Gems No:


Batch:
Q.9
Write a Java program to read text file and find number of vowels, number of words from it.
Also find number of times ‘a’ occurred in text file

Name of student: Roll No: Gems No:


Q.10 Batch:

Write a java Program to Add button, text field & text area

Name of student: Roll No: Gems No:


Q.11 Batch:

Write GUI program to demonstrate radiobutton.

Name of student: Roll No: Gems No:


Q.12 Batch:

Write GUI program to find factorial of given number using applet.


Q.13 Name of student: Roll No: Gems No:
Batch:

Write java program to demonstrate Hierarchical inheritance.

Q. 14 Name of student: Roll No: Gems No:


Batch:

Write java program to demonstrate Multilevel inheritance

Q.15
Name of student: Roll No: Gems No:
Batch:

Write a Java program to read the first 3 lines of a file.

Q16
Name of student: Roll No: Gems No:
Batch:

Write a Java program to find the longest word in a text file.


Q17
Name of student: Roll No: Gems No:
Batch:

Write a Java program to find how many words are started with letter “S” in a text file.

Q18
Name of student: Roll No: Gems No:
Batch:

Write a Java program to create a class called Animal with a method called makeSound().
Create a subclass called Cat that overrides the makeSound() method to bark.

Q19
Name of student: Roll No: Gems No:
Batch:

Write a Java program to create a class known as Person with methods called getFirstName()
and getLastName(). Create a subclass called Employee that adds a new method named
getEmployeeId() and overrides the getLastName() method to include the employee's job title.

Q20
Name of student: Roll No: Gems No:
Batch:

Write a Java program to create an interface Playable with a method play() that takes no
arguments and returns void. Create three classes Football, Volleyball, and Basketball that
implement the Playable interface and override the play() method to play the respective sports.

You might also like