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

  1. 1
    Your First Program and Output

    Your first Java program: the Main class, the main method and System.out.println.

  2. 2
    Variables and Data Types

    The int, long, double, char, boolean and String types; arithmetic and overflow.

  3. 3
    Reading Input: Scanner and BufferedReader

    Reading input with Scanner: nextInt, nextLong, next.

    1 problems

  4. 4
    Conditional Statements

    if/else, logical && and ||, comparing strings with equals.

    1 problems

  5. 5
    Loops

    The for and while loops: counters, accumulating sums and products.

    2 problems

  6. 6
    Arrays

    int[] arrays: creation, reading, traversal and finding the maximum.

    1 problems

  7. 7
    Strings and StringBuilder

    Strings: length, charAt, substring, immutability and StringBuilder.

    3 problems

  8. 8
    Methods

    Static methods: parameters, return values, GCD and a primality check.

    2 problems

  9. 9
    Collections: ArrayList, HashMap, TreeSet

    Collections: ArrayList, HashMap, TreeSet and sorting with Arrays.sort.

  10. 10
    Contest Setup: Fast I/O

    BufferedReader and StringBuilder: fast input/output and a contest template.

Доска