5. Integer & Long
• Allow us to sign value that is number like 88
with its name into RAM.
Name Width Digit
long 64 15
int 32 9
6. Example
int a = 12345588;
int b = 2233477;
long c = (long) a * (long) b ;
System.out .println(c);
7. Double & Float
• Allow us to sign value that is decmal number
like 50.11 with its name into RAM.
Name Width in Bits Digit
double 64 308
float 32 38
8. Example
float f1 = 4.4f;
double d1 = 5.234d;
System.out.println( d1 + f1 );
9. String & Char
• Allow us to sign value that is character like ‘S’
or “ahmad” with its name into RAM.
Name Width in Bits characters
String 64 2147483647
Char 8 1
10. Example
String Ahamd = “Ahamd Ali Mohamad” ;
char x = Ahamd.charAt(0) ;
System.out.println(Ahamd + “ = ” + x);
11. Special escape sequences
Notation Character represented
n Newline (0x0a)
r Carriage return (0x0d)
f Formfeed (0x0c)
b Backspace (0x08)
s Space (0x20)
t tab
" Double quote
' Single quote
backslash
ddd Octal character (ddd)
uxxxx Hexadecimal UNICODE
character (xxxx)