Java Training In Noida- Sky Infotech

Page 1

What is a class in Java?

Class is a blueprint of an object that includes all the data and contains variables, methods & constructors. Every class object much has basic class properties. Classes are pretty useful in Java because it creates objects with similar attributes and behavior. What are variables and why it is used?

Member variables in Java are a variable which is linked with specific object and is accessible for all the methods. Member variable is used to store a data value. Variables have three types; Local variable, Instance variable and Class variable.

 LOCAL VARIABLE

Local variable is the first variable of the member variable. These are the variables which are declared within the method of a class.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.