Level 19 Level 21
9 words 0 ignored
Ready to learn Ready to review
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
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'
declared in methods, constructors, or blocks.
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.