\r
Carriage return
\f
Formfeed
\\
Backslash
\’
Single Code
\”
Double Code
\ddd
Octal
\xdd
Hexadecimal
\udddd
Unicode Character
attention@computerscienceexpertise.com PDF created with pdfFactory Pro trial version www.pdffactory.com
Declaration of Variables in JAVA
A Declaration of a variable refers to the following: (i). Specification of the name of the variable.
(ii). Specification of the data type of the variable. (iii). Specification of the scope of usage of the variable. eg.
int age;
String name;
boolean isAbsent;
attention@computerscienceexpertise.com PDF created with pdfFactory Pro trial version www.pdffactory.com
Arithmetic Operators
Operator Meaning
Format
+ Addition
a+b
-
Substraction
a-b
* Product
a*b
/ Division
a/b
% Modulus
a%b
where a and b are the two numeric constants.
attention@computerscienceexpertise.com PDF created with pdfFactory Pro trial version www.pdffactory.com
Assignment Operators
Operator/ Operation/ Format/ Meaning
=
Assignment
a=10
10 assigned to
the variable a
+=
Add to the variable a+=5 a=a+5
-=
Subtract from variable a-=5
a=a-5
*=
Multiply to variable a*=5
a=a*5
/=
Divide into
a/=5
a=a/5
%=
Modulus of
a%=5
a=a%5
attention@computerscienceexpertise.com PDF created with pdfFactory Pro trial version www.pdffactory.com
Shorthand Notation
Java Learning Made Easy
Start from the beginning
