Introduction to Computer Science - Java
Some Language Specifications
- Conditional Operators
- || - logical or
- | - logical binary or
- && - logical and
- & - logical binary and
- ^ - exclusive or ( xor )
- != , == , <=, >=, < , >, ! ( condition )
- "short circuiting"
- Operators
- +, -, =, *, /, %, ++, --, +=, -=, *=, /= , %=
- condition ? statement : statement ;
- i++ vs. ++i
- Casting.
Example:
int a =7;
System.out.println( (float)a);
- int, float, double, long, boolean, unsigned, final
© Nachum Danzig November 2003