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 I call a local inner class?

Leave a Reply

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