0% found this document useful (0 votes)
8 views11 pages

Java Programs Cse2 H

The document is an index of Java programming exercises, detailing ten different programs that cover various concepts such as even/odd number checking, largest number identification, Fibonacci series generation, palindrome checking, method overloading, class creation, single inheritance, constructor overloading, interface implementation, and package creation. Each program is assigned a page number and includes an object description. The document serves as a guide for learning Java programming fundamentals.

Uploaded by

sourabhraj2015
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)
8 views11 pages

Java Programs Cse2 H

The document is an index of Java programming exercises, detailing ten different programs that cover various concepts such as even/odd number checking, largest number identification, Fibonacci series generation, palindrome checking, method overloading, class creation, single inheritance, constructor overloading, interface implementation, and package creation. Each program is assigned a page number and includes an object description. The document serves as a guide for learning Java programming fundamentals.

Uploaded by

sourabhraj2015
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/ 11

INDEX

S.NO. PROGRAM Pg.No. Date Signature


01 Java program to find whether a 01
number is even or odd.

02 Java program to find the largest among 02


three numbers using if-else.

03 Java program to print Fibonacci series 03


up to ‘n’ terms using loops.

04 Java program to check whether a given 04


string is a palindrome or not

05 Java program to demonstrate method 05


overloading with two methods named
add.

06 Java program to create a class Student 06


with data members roll number, name,
and marks. Initialize and display their
details.

07 Java program to demonstrate single 07


inheritance

08 Java program to demonstrate 08


constructor overloading in a class

09 Java program to create an interface 09


Shape with method area() and
implement it in class Circle and
Rectangle.

10 Java program to create a package 10

1
Program 1
Object: Write a Java program to find whether a number is
even or odd.

Output:

2
Program 2
Object: Write a Java program to find the largest among
three numbers using if-else.

Output:

3
Program 3
Object: Write a Java program to print Fibonacci series up to
‘n’ terms using loops.

Output:

4
Program 4
Object: Write a Java program to check whether a given
string is a palindrome or not.

Output:

5
Program 5
Object: Write a Java program to demonstrate method
overloading with two methods named add.

Output:

6
Program 6
Object: Write a Java program to create a class Student with
data members roll number, name, and marks. Initialize and
display their details.

Output:

7
Program 7
Object: Write a Java program to demonstrate single
inheritance (e.g., class Person as parent and class Employee
as child).

Output:

8
Program 8
Object: Write a Java program to demonstrate constructor
overloading in a class.

Output:

9
Program 9
Object: Write a Java program to create an interface Shape
with method area() and implement it in class Circle and
Rectangle.

Output:

10
Program 10
Object: Write a Java program to create a package named
myPackage, and create a class inside it to display "Hello
from myPackage".

Output:

11

You might also like