Java Reference
In-Depth Information
Appendix B
Java Summary
Java Keywords
abstract
continue
for
new
switch
assert
default
goto
package
synchronized
boolean
do
if
private
this
break
double
implements
protected
throw
byte
else
import
public
throws
case
enum
instanceof
return
transient
catch
extends
int
short
try
char
final
interface
static
void
class
finally
long
strictfp
volatile
const
float
native
super
while
Primitive Types
Type
Description
Examples
integers (whole numbers)
int
42, -3, 18, 20493, 0
real numbers
double
7.35, 14.9, -19.834
single characters
char
'a', 'X', '!'
logical values
boolean
true, false
Arithmetic Operators
Operator
Meaning
Example
Result
addition
+
2 + 2
4
subtraction
-
53 - 18
35
multiplication
*
3 * 8
24
division
/
4.8 / 2.0
2.4
remainder or mod
%
19 % 5
4
1107
 
 
Search WWH ::




Custom Search