Precedence | Operator | Association |
---|---|---|
1 | ++ --
(unary) + - ~ ! (cast) |
Right |
2 | * / % | Left |
3 | + - | Left |
4 | << >> >>> | Left |
5 | < > <= >= | Left |
6 | == != | Left |
7 | & | Left |
8 | ^ | Left |
9 | | | Left |
10 | && | Left |
11 | || | Left |
12 | ? : | Right |
13 | = *= /= += -=
<<= >>= >>>= &= ^= |= |
Right |
Type | Signed? | Bits | Bytes | Lowest | Highest |
---|---|---|---|---|---|
boolean | n/a | 1 | 1 | false | true |
char | unsigned Unicode | 16 | 2 | '\u0000' | '\uffff' |
byte | signed | 8 | 1 | -128 | +127 |
short | signed | 16 | 2 | -32,768 | +32,767 |
int | signed | 32 | 4 | -2,147,483,648 | +2,147,483,647 |
long | signed | 64 | 8 | -9,223,372,036,854,775,808 | +9,223,372,036,854,775,807 |
float | signed exponent and mantissa | 32 | 4 | ±1.40129846432481707e-45 | ±3.40282346638528860e+38 |
double | signed exponent and mantissa | 64 | 8 | ±4.94065645841246544e-324 | ±1.79769313486231570e+308 |
System
PropertyName |
Description | accessible
in applet? |
---|---|---|
file.separator | File separator (e.g., "/") | yes |
java.class.path | Java classpath | no |
java.class.version | Java class version number | yes |
java.home | Java installation directory | no |
java.vendor | Java vendor-specific string | yes |
java.vendor.url | Java vendor URL | yes |
java.version | Java version number | yes |
line.separator | Line separator | yes |
os.arch | Operating system architecture | yes |
os.name | Operating system name | yes |
path.separator | Path separator (e.g., ":") | yes |
user.dir | User's current working directory | no |
user.home | User home directory | no |
user.name | User account name | no |
public class A { protected int p }; // presume class B is in a different package from A class B extends A { void myMethod() { p = 1; // ok A a = new A(); a.p = 1; // not ok, p would have to be public for this to work. } }See public, private, package.
![]() |
![]() |
![]() |
|
Canadian Mind Products | The Mining Company's Focus on Java Best of the Net Award |
You can get an updated copy of this page from http://mindprod.com/jglossp.html |