Example Student class

Example Student class. The student class has four properties namely roll number, name, standard and total marks. All these properties have respective methods to get and set object values.

The student class has two constructors, one is the default, and another one is overloaded to accept all four properties and set them to object properties. Student class also has overridden the toString method from Object class which prints the nice summary when student object is printed.

The student class has been referred to by many of the website examples.

Please let me know your views in the comments section below.

About the author

RahimV

RahimV

My name is RahimV and I have over 16 years of experience in designing and developing Java applications. Over the years I have worked with many fortune 500 companies as an eCommerce Architect. My goal is to provide high quality but simple to understand Java tutorials and examples for free. If you like my website, follow me on Facebook and Twitter.

Add Comment

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