Variable Type in Java





A class can contain any of the following variable types.
·     Local variables: Variables defined inside methods, constructors or blocks are called local    variables. The variable will be declared and initialized within the method and the variable will  be destroyed when the method has completed. click here
·       Instance variables: Instance variables are variables within a class but outside any method.    These variables are instantiated when the class is loaded. Instance variables can be                accessed from inside any method, constructor or blocks of that particular class.click here

·        Class variables: Class variables are variables declared with in a class, outside any method,    with the static keyword. click here

Comments

Popular posts from this blog

Operating System | Best Definition of Opetating System

Umbrella activities in Software Engineering