Can students be class in Java?

In this example, we have created a Student class which has two data members id and name. We are creating the object of the Student class by new keyword and printing the object’s value. Here, we are creating a main() method inside the class. //Defining a Student class.

Sizin İçin Seçtik  How do you write your name in C++?

Leave a Reply

Your email address will not be published. Required fields are marked *