Level 19 Level 21
Level 20

Variable Types


9 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
data type variable = value;
declares a variable
int a, b, c;
Declares three ints, a, b, and c.
int a = 10;
Example of initialization
byte B = 22;
initializes a byte type variable B.
double pi = 3.14159;
declares and assigns a value of PI.
char a = 'a';
the char variable a iis initialized with value 'a'
Local variables
declared in methods, constructors, or blocks.
Instance variables
declared in a class, but outside a method, constructor or any block
Class variables, static variables
Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block.