Java Intermediate

Methods, arrays, strings and nested loops.

3 lessons 5 tasks ⚡ Live compiler
Lessons Compiler Quiz Certificate

📚 Lessons

1 Nested loops & algorithms

Combine loops and conditions to compute results. Below sums the multiples of 3 below 20.

public class Main {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i < 20; i++) {
            if (i % 3 == 0) sum += i;
        }
        System.out.println("sum = " + sum);
    }
}

2 Arrays

An array stores a fixed number of same-typed values, indexed from 0. Iterate with an enhanced for.

int[] xs = {10, 20, 30};
for (int x : xs) System.out.println(x);
System.out.println(xs.length); // 3

3 Strings

Strings are objects with methods like length(), toUpperCase() and substring(). Strings are immutable.

String s = "Java";
System.out.println(s.length());      // 4
System.out.println(s.toUpperCase()); // JAVA

⚡ Java Compiler

Code runs on a learning-oriented simulated runtime that supports common constructs (output, variables, arithmetic, conditionals and loops).

JAVA

            

📝 Tasks

5 tasks across 2 pages — multiple-choice and fill-in (type the answer). Score 70% or higher to earn your certificate.

🎓 Certificate of Completion

🔒 Pass the quiz above (70%+) to unlock your downloadable certificate.