Java Fundamentals: Learn to Program in Java

Java Fundamentals is a beginner-level course of 5 lessons (about 3 h 5 min), with 17 exercises and 15 quiz questions. Prerequisites: Programming Basics and Algorithms. Exercises are run and checked in a server-side sandbox.

  • Java
  • Beginner
  • 5 lessons
  • 3 h 5 min
  • 17 exercises
  • Exercises run in a server sandbox

The course in brief

This course introduces you to the Java language, widely used in business and in back-end development. You will write your first programs, work with variables and types, structure your logic with conditions, loops, and methods, then process collections of data with arrays, strings, and ArrayList. Each lesson offers exercises that are run and checked automatically.

What you will be able to do

  • Write, compile, and run a Java program that reads data and prints a result
  • Choose suitable types and avoid the pitfalls of integer division
  • Structure logic with conditions, switch expressions, and loops
  • Split a program into reusable, testable methods
  • Work with arrays, strings, and ArrayList

Syllabus: 5 lessons

    • Write, compile, and run a Java program
    • Declare variables with primitive types and String
    • Read keyboard input with Scanner and display a formatted result

    Program structurePrimitive types and StringConsole input/output

  1. 02

    Conditions, Logical Operators, and switch

    15 min
    • Write conditions with if, else if, and else
    • Combine conditions with &&, ||, and !
    • Use the modern switch expression

    ConditionsLogical operatorsswitch expressions

  2. 03

    for, while, and do-while Loops

    20 min
    • Repeat statements with for, while, and do-while
    • Accumulate results (sum, counter, maximum)
    • Control a loop with break and continue

    LoopsAccumulators

  3. 04

    Writing Methods

    20 min
    • Split a program into reusable static methods
    • Use parameters, return values, and overloading
    • Understand variable scope and pass-by-value

    MethodsOverloadingScope and pass-by-value

  4. 05

    Arrays, Strings, and ArrayList

    20 min
    • Store and iterate over data in an array
    • Manipulate strings with the String and StringBuilder methods
    • Use an ArrayList when the size varies

    ArraysString and StringBuilderArrayList

Final project

Command-Line Grade Manager

Write a Java program that reads a list of students and grades from standard input (one line per student: name followed by their grades), validates the data, then prints a report card: each student's average with their grade label, the best and lowest averages, the overall average, and the list of students below 10. The program is split into methods and does not crash on a malformed line.

Deliverables

  • A complete, commented Main.java file
  • At least five static methods (reading, average calculation, grade label, statistics, display)
  • A sample input file and the corresponding expected output
  • A short README explaining how to compile and run the program

Assessment criteria

  • The program compiles and produces the expected output on the provided example
  • Invalid lines are reported without stopping the program
  • No unintended integer division and averages displayed to two decimal places
  • Short, well-named methods that return values rather than printing
  • Relevant use of arrays, ArrayList, and StringBuilder

Frequently asked questions

Do I already need to know how to program to take this course?

It is enough to have taken an introductory algorithmics course (variables, conditions, loops), such as the path's Programming Basics course. The concepts are reviewed step by step in Java.

Which version of Java is used?

Java 25, the current LTS (long-term support) version. The features useful to beginners are presented: var, the switch expression, getFirst() and getLast() on lists, and compact source files (void main() without a class) finalized in Java 25.

Do I need to install anything?

Not for the exercises, which run online. To work on your own computer, install a JDK 25 (for example Eclipse Temurin) and an editor such as IntelliJ IDEA or VS Code.

What should I do after this course?

The path continues with object-oriented Java, then collections and streams, JUnit testing, and Spring Boot to build web APIs.

This course, told for your job

Say what you want to be able to do: “Java Fundamentals” takes its place in your path, with examples from your field. The concepts stay those of the course.

The preview is free, and you can take the courses one at a time without paying. The path only contains lessons from the catalogue.