Java Pra
Java Pra
Java Pra
Jadeja
Semester : 5th
Batch :
Sr.
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
LIST OF EXERCISES/PRACTICAL
Install JDK, write a simple Hello World or similar java program,
compilation, debugging, executing using java compiler and interpreter.
Write a program in Java to generate first n prime numbers.
Write a program in Java to find maximum of three numbers using
conditional operator
Write a program in Java to find second maximum of n numbers
without using arrays
Write a program in Java to reverse the digits of a number using while
loop
Write a program in Java to convert number into words & print it
Write programs in Java to use Wrapper class of each primitive data
types
Write a program in Java to multiply two matrix
Write a static block which will be executed before main( ) method in a
class.
Write a program in Java to demonstrate use of this keyword. Check
whether this can access the private members of the class or not.
Write a program in Java to develop overloaded constructor. Also
develop the copy constructor to create a new object with the state of
the existing object.
Write a program in Java to demonstrate the use of private constructor
and also write a method which will count the number of instances
created using default constructor only.
Write a program in Java to demonstrate the use of 'final' keyword in
the field declaration. How it is accessed using the objects.
Develop minimum 4 program based on variation in methods i.e.
passing by value, passing by reference, returning values and returning
objects from methods.
Write a program in Java to demonstrate single inheritance, multilevel
inheritance and hierarchical inheritance.
Create a class to find out whether the given year is leap year or not.
(Use inheritance for this program)
Write an application that illustrates how to access a hidden variable.
Class A declares a static variable x. The class B extends A and declares
an instance variable x. display( ) method in B displays both of these
variables.
Write a program in Java in which a subclass constructor invokes the
constructor of the super class and instantiate the values.
App
r
oxim
a te
Hrs.
2
2
1
2
1
2
4
2
1
1
2
1
2
3
2
2
Planned
Date
Actual
Date
19
20
21
22
23
24
25
26
27
28
29
30
2
1
2
1
2
2
2