It is used to define a user defined reference type datatype member.
Class Class Name
. . . . .
Members of the class is of two types
- Instance members
- Shared members
These members are binded to the objects defined for the class and they can be accessed using the object name.
These members belong to the class definition and they can be accessed using the class name.
Shared members will be loaded on the memory when the class definition is headed.
instance of a class is called as an object.
- Objects occupy the physical memory
- Objects are always isolated i.e. the values assigned for the members of one object will not be reflected for the members of other object.
Modifier object name as new Class Name ([. . .])
These are the place holders for maintaining a value based on the data type used for defining the variable.
Modifier variable name as Datatype [=value]
These are the access specifiers which are used to control the access of the members.
All the above modifiers can be used within a module and class. But these modifiers can’t be used from the methods.
Public I as integer ‘valid’
Public j as integer ‘valid’
Sub main ( )
‘Public K as integer error