0% found this document useful (0 votes)
3 views1 page

Java Unit2 Practical List

This document outlines practical exercises for a Java course focused on classes, objects, and constructors. It includes tasks such as creating a Student class, demonstrating various types of constructors, and showcasing method overloading and access modifiers. Each practical aims to reinforce key object-oriented programming concepts in Java.

Uploaded by

vyassoham26
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)
3 views1 page

Java Unit2 Practical List

This document outlines practical exercises for a Java course focused on classes, objects, and constructors. It includes tasks such as creating a Student class, demonstrating various types of constructors, and showcasing method overloading and access modifiers. Each practical aims to reinforce key object-oriented programming concepts in Java.

Uploaded by

vyassoham26
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

Java Practical – Unit 2

Classes, Objects and Constructors


Practical No. Aim

1 To write a Java program to create a Student class, create three objects of the
Student class, assign student name to each object and display it on the screen.

2 To write a Java program to create an Account class and create three class
variables namely name, account_no and balance, assign values to them and
display the output.

3 To write a Java program to create a Car class and set and get values of car
name and number using setdata() and getdata() methods.

4 To write a Java program to demonstrate Default Constructor.

5 To write a Java program to demonstrate Parameterized Constructor.

6 To write a Java program to demonstrate Copy Constructor (User Defined


Concept).

7 To write a Java program to demonstrate Constructor Overloading.

8 To write a Java program to demonstrate Method Overloading.

9 To write a Java program to demonstrate Static Method.

10 To write a Java program to demonstrate the use of this keyword.

11 To write a Java program to demonstrate Access Modifiers.

You might also like