Class, Object & Method

 

 In this picture, "Student" is a class, and the objects are the individual students, such as Mary, Ram, and John.

                                                       Declared a class named Student.
                                             
                                             
                        This code demonstrates how to define a simple class, create an object of                     
that class, set its fields, and access its fields.

Introducing method inside a class


Parametrized method in a class

Using the method in the Student class helps keep your code clean, reusable, and easy to maintain.


Returning Value from a method












 

 

Comments

  1. Template design sundor hoise. Screen shot image gular Extra large size dish

    ReplyDelete

Post a Comment