You are on page 1of 1

USEFUL JAVA FACTS

Comparison operators ==, <, >, !=, <=, >= Arithmetic operators +, -, *, /, %, ++, -Logical operators &&, ||, ! Native data types char, byte, short, int, long, float, double, boolean Selection operator . Assignment operators =, +=, *=, -=, /+, %= Casting (type) var Scanner (input) methods int nextInt() String next() Print (output) methods System.out.print() System.out.println() Math methods double Math.random() case 'value': {statement block; [break;]} .. [default: {statement block}] } String methods int length() char charAt(int index) int compareTo(String anotherString) String endsWith(String suffix) int indexOf(String str) int indexOf(String str, int fromIndex) Character methods boolean isDigit() boolean isLetter()

Decision statements if(boolean statement){ statement block } [else{ statement block }] switch(intDataType){

You might also like