Operators operate on operands.
For example:
int a = 6;
In the above example an integer variable a has been declared and assigned a value 6.
int is a data type.
a is an identifier (variable name).
= is an operator (assignment operator)
6 is a literal (value).
; is terminator operator.
There are 4 types of operators in Java:
For example:
int a = 6;
In the above example an integer variable a has been declared and assigned a value 6.
int is a data type.
a is an identifier (variable name).
= is an operator (assignment operator)
6 is a literal (value).
; is terminator operator.
There are 4 types of operators in Java:
No comments:
Post a Comment