What is a Variable?
x = 10
to create a variable.int x = 10;
to show what kind of value x
holds.What is a Constant?
final int x = 10;
to show that x
is a constant and cannot change.How Programming Languages Handle Typing
Preventing Changes to Constants
What is a Variable?
x = 10
to create a variable.int x = 10;
to show what kind of value x
holds.What is a Constant?
final int x = 10;
to show that x
is a constant and cannot change.How Programming Languages Handle Typing
Preventing Changes to Constants