Logo

Home Basics Structures Collections Constructors and Methods Classes

Basics:

Type
Discription
Example
byte
8 bit integer 16, -4, 10, 0, -1
short
16 bit integer 128, -50, 75
int
32 bit integer 5000, -2000, 4763, -1864
long
64 bit integer 63832658, -837583, 746282
float
Single percision floating point 32.5, 18.83
double
double precision floating point 2.47563, 1.8773772
char
a single 16 bit character 'c', '7', '?'
boolean
true or false true, false
String
word, sentence, random characters. "hi" How are you?"

 

Operation
Description
Example
>
Greater than 6 > i, x > y
<
Less than i< 8, y < k
= =
equals to i = = 8, n = = m
>=
Greater than or equal to i >= 9, k >= j
<=
Less than or equal to i<= 6, d<= w
=
Assignment Statement i = 0;, sim = "hat";
.equals(n)
String equals to i.equals("him"), l.equals(j)
&&
and i > k && k <m
||
or i > k || k <m
!=
not equals i != m
^
exclusive or i > k ^ k <m
!
not !found
+
addition i + k, 7 +9, j +1
-
subtraction i - k, 7 -9, j -1
*
multiplecation i * k, 7 *9, j *1
/
division i / k, 7 /9, j/1
%
mod(division but returns the remainder) i % k, 7%9, j %1

 

Copyright 2009 Kimberly Pardue
Last updated: March 18, 2009

Home | Basics |Structures |Collections |Con/Meth |Classes