Java Programming with IntelliJ IDEA
Write, test and debug object-oriented Java in IntelliJ IDEA, from your first Maven project to a tested command-line application.
Beginner · Software Development · about 11 hours · 4 modules · certificate on completion
Taught by Agnieszka Kowalskà, Ravi Chandrasekharàn, AI Learning Companions.
About this course
Learn Java the way professional developers write it: in IntelliJ IDEA, an IDE that understands your code. Each lesson teaches a Java idea and then shows it in IntelliJ IDEA, step by step, with the keyboard shortcuts for macOS, Windows and Linux, so you learn the language and the tool together. You'll create a Maven project with a JDK the IDE downloads for you and write programs with types, decisions, loops and methods. Then you'll model real things with classes, inheritance, interfaces and records, process data with collections and streams, and handle what goes wrong with exceptions. Finally you'll prove your code works with JUnit 5 tests and track bugs down with the debugger instead of guesswork. Every module ends with a hands-on lab that you do in IntelliJ IDEA and submit for your instructor's feedback, and the course ends with a library-management app that you build from scratch.
What you'll learn
- Set up a JDK and a Maven project in IntelliJ IDEA, and build and run Java programs from the IDE
- Write Java with variables, types, decisions, loops and methods
- Model problems with classes, constructors, inheritance, interfaces and records
- Process data with lists, sets, maps and streams, and handle errors with exceptions
- Test code with JUnit 5 and find bugs with IntelliJ IDEA's debugger
Skills you'll gain
Java, IntelliJ IDEA, Object-oriented programming, Maven, Collections and streams, Exception handling, Unit testing with JUnit 5, Debugging
Tools
IntelliJ IDEA, Java, Maven, JUnit 5
Before you start
None: this course starts from zero. You need a Windows, macOS or Linux computer that can run IntelliJ IDEA (the free version is enough) and an internet connection: IntelliJ IDEA downloads a JDK for you, and the Maven that comes with it downloads the libraries your projects use.
Modules
Get set up and write your first programs
Create a Maven project in IntelliJ IDEA with a JDK it downloads for you, then write programs with Java's types, decisions, loops and methods, with an editor that completes and checks your code as you type.
- How Java runs, and your first Maven project (14 min)
- Variables, types and strings (12 min)
- Decisions, loops and methods (14 min)
- Hands-on lab: Write a step-count report
Object-oriented programming
Model the things a program works with as objects: classes with private fields and constructors, inheritance and polymorphism, interfaces, and records for plain data, with IntelliJ IDEA generating the routine code.
- Classes, objects and constructors (12 min)
- Inheritance and polymorphism (12 min)
- Interfaces and records (12 min)
- Hands-on lab: Model a smart home
Collections, streams and exceptions
Store and look up data with lists, sets and maps, process it with streams and lambdas, and handle what goes wrong, from a bad line of input to a missing file, with exceptions.
- Lists, sets and maps (12 min)
- Streams and lambdas (13 min)
- Exceptions and files (13 min)
- Hands-on lab: Analyse weather readings
Testing with JUnit 5 and debugging
Prove your code works with JUnit 5 tests that run in IntelliJ IDEA and in Maven, cover many cases with parameterised tests, measure coverage, and find bugs with the debugger instead of guesswork.
- Unit tests with JUnit 5 (13 min)
- Parameterised tests and coverage (11 min)
- Debugging Java in IntelliJ IDEA (12 min)
- Hands-on lab: Test and debug a password checker
Project: Build a library-management command-line app
Build a command-line app in IntelliJ IDEA that a small community library could use for its books and loans. Librarians can add books (ISBN, title, author and year), register members, lend a book to a member for 14 days, take it back, search by title or author, and list the loans that are overdue on a given date. Model books, members and loans with classes and records, keep them in collections, and use streams for searching and reporting. Report problems, such as an unknown ISBN or a book that's already on loan, with your own exceptions, so the app prints a clear message and carries on. Save the data to a file so it's still there next time. Build it as a Maven project, test it with JUnit 5, and use the debugger whenever something doesn't behave.
Part of
IntelliJ IDEA is a trademark of JetBrains s.r.o. This course is independent: JetBrains hasn't made or endorsed it.