際際滷

際際滷Share a Scribd company logo
Learn About Variables:
10
Learn About Variables
Learn About
Variables:
Variables act like containers that keep and store
your data. As Java is statically typed, its important
to first declare a variable before we start using it.
In Java there are three types of variables;
Static variable: the keyword here is static but its
defined the same way as the instance variable.
Local variable: its confined within the body of the
method
Instance variable: its outside any block or method
and it's defined in a class.
Learn About Variables

More Related Content

Learn About Variables

  • 3. Learn About Variables: Variables act like containers that keep and store your data. As Java is statically typed, its important to first declare a variable before we start using it.
  • 4. In Java there are three types of variables; Static variable: the keyword here is static but its defined the same way as the instance variable. Local variable: its confined within the body of the method Instance variable: its outside any block or method and it's defined in a class.