Java from Scratch
Java is a strict and powerful language. This course goes from your first program to collections and fast contest I/O.
In this section
- 1Your First Program and Output
Your first Java program: the Main class, the main method and System.out.println.
- 2Variables and Data Types
The int, long, double, char, boolean and String types; arithmetic and overflow.
- 3Reading Input: Scanner and BufferedReader
Reading input with Scanner: nextInt, nextLong, next.
1 problems
- 4Conditional Statements
if/else, logical && and ||, comparing strings with equals.
1 problems
- 5Loops
The for and while loops: counters, accumulating sums and products.
2 problems
- 6Arrays
int[] arrays: creation, reading, traversal and finding the maximum.
1 problems
- 7Strings and StringBuilder
Strings: length, charAt, substring, immutability and StringBuilder.
3 problems
- 8Methods
Static methods: parameters, return values, GCD and a primality check.
2 problems
- 9Collections: ArrayList, HashMap, TreeSet
Collections: ArrayList, HashMap, TreeSet and sorting with Arrays.sort.
- 10Contest Setup: Fast I/O
BufferedReader and StringBuilder: fast input/output and a contest template.