
Meet your instructor, a seasoned full-stack engineer, and discover how IntelliJ is the tool of choice for developing and configuring applications, with new features and tricks to explore.
Explore the IntelliJ IDEA 2021 interface, including navigation bar, project tool window, editor, and status bar, and learn to install plugins from settings and marketplace such as Lombok and PlantUML.
If you would like to create a personal cheat sheet of things to memorize, consider creating a new scratch file (see lecture in the Misc section) to note down the things and shortcuts that you intend to start using.
You can download, unzip and open the "coding-java" folder in IntelliJ if you want to code along with me. It contains sample code for this course.
The online-course-app is a sample application used in the Spring Integration section of this course.
Create packages and classes in IntelliJ IDEA 2021 for Java and Kotlin, using ALT+INSERT to generate constructors, equals and hashCode, and getters or setters for price, rooms, floors, and address.
Learn to comment code in Java, XML, and YAML with line and block comments, using keyboard shortcuts to comment and uncomment across multiple lines.
Master essential editing shortcuts in IntelliJ IDEA to edit text and code efficiently, including F2 for errors, Alt Enter for fixes, and multi-cursor with Alt+Shift.
Shortcuts covered in this lecture:
reformat code
optimize imports
join lines
Note 1: you can also export your customized code formatting settings to share it with other team members from the settings dialog.
To make sure other developers (with other IDEs) adhere to the same code formatting rules, consider using a ".editorconfig" file. This is described in a separate lecture in the bonus section.
Note 2: In the settings, you can enable auto-formatting and import optimization as a default action to be performed on save. The version control commit dialog also has checkboxes to run these actions before committing.
Discover multiple auto completion mechanisms in A.J., including control-space and control-shift-space, with intelligent filtering by type to complete statements, if blocks, and customizable code completion settings.
Learn how to override superclass methods in Java using IntelliJ shortcuts and postfix completion to generate statements, including a format call to display room and floor counts.
Explore how to speed up Java development in IntelliJ IDEA with live templates and postfix completion. Create custom templates with placeholders and context to reuse code patterns and automate imports.
Explore simple refactorings to improve clarity and maintainability by renaming a method that greets and its value parameter, extracting a constant for the hello string, and inlining the parameter.
Refactor safely by introducing a string to string hash map for replacements and iterating the map to apply changes, with tests ensuring behavior stays consistent.
Explore type migrations and constructor signature changes by converting a price field from a wrapper to a primitive double, previewing impacted locations, and cleaning up the pay method.
Explore refactoring a pizza class by replacing a bloated constructor with a factory method to create a margarita pizza, and consider a builder pattern for selecting ingredients.
Refactor a pizza class by replacing the constructor with a builder and introducing a public static builder class to create pizzas via a factory method with toppings.
apply the extract parameter object refactoring to simplify a method signature by creating a point class with X and Y, and replacing parameters with the new object.
Explore replacing if statements with the strategy pattern to calculate entrance fees using adult and child strategies for full and half-day tickets, via a clear fee strategy interface.
Learn to create and run JUnit 5 tests in IntelliJ IDEA 2021 for Java and Kotlin developers, navigate to test classes and methods, and apply JUnit 5 annotations with shortcuts.
Note for color-blind users: To modify the line coverage colors, go to 'File | Settings | Editor | Color Scheme | General' and choose "Line coverage" from the tree of options.
JaCoCo is often used to calculate test coverage metrics on CI/CD systems - having the same percentages in IntelliJ and on a build server is a good idea. This lecture shows you how to change the setting in IntelliJ.
Tip: To better memorize shortcuts for various tool windows, display the tool window numbers in the IDE.
Assign custom tool window shortcuts in IntelliJ IDEA 2021 for Java and Kotlin developers by using the actions dialog (Ctrl+Shift+A), selecting configure shortcuts, and setting a MAVEN shortcut in Settings.
Search inside an open file via the toolbar and highlight matches. Navigate between results with arrow keys, refine with match case or word matching, and replace all occurrences with ctrl+shift+alt+g.
Learn basic replacement in files using the replace dialog in IntelliJ IDEA, choosing instance-by-instance or all, toggling case matching, and using the preserve case option to keep uppercase where appropriate.
Open the find dialog with ctrl+shift+f to search the entire project or a custom scope, preview results, refine with file mask filters, and review matches in the find window.
Replace strings across an entire project in IntelliJ IDEA 2021 using a custom scope, filtering to Java files, previewing matches, and applying replacements with keyboard shortcuts.
Explore using regular expressions for search and replace in a comma-separated file, matching a date with capture groups and reformatting it to a dash-delimited pattern via replacements.
Explore viewing type and method hierarchies in IntelliJ IDEA 2021 for Java and Kotlin developers. Navigate between superclasses, subclasses, and method implementations using hierarchy shortcuts and the actions dialog.
Navigate large IntelliJ IDEA projects by using shortcuts to find files, classes, and symbols across modules and packages. Explore go-to-class and search-everywhere features, plus typing highlights and package views.
Access recently opened files with the recent files shortcut, scroll, or type to trim results. Use control shift plus you to view more context in the structure and module windows.
Create and edit bookmarks in your files with F11 or right-click, and use mnemonic bookmarks with Ctrl+F11. View bookmarks in the Favorites window or with Shift+F11 to navigate to locations.
Open the favorites window, create a new list like code samples, and add files or packages to organize key Java files. Access favorites via shortcuts or the Find Action dialog.
Learn to manage angular dependencies via npm by editing package.json, selecting versions (latest or lts), and installing with npm install; remove dependencies by editing package.json and re-running npm install.
Open the project window and press Ultan Insert to insert new angular dependencies or angular schematics to generate, for example, a new cloth inside our app folder.
Visualize JavaScript module dependencies with diagrams to see the dependency cluster in an Angular project and gauge complexity; avoid running it inside a JavaScript project if you want that view.
Access maven settings quickly in the Maven settings dialog in IntelliJ, adjust output level, thread count, and maven version (bundled or wrapper), and configure a custom settings XML for proxies.
Use the Maven tool window to view the effective POM and generate a dependencies diagram, identifying transitive dependencies and classpath conflicts, then apply exclusions to prevent loaded dependencies.
Clone a Java and Kotlin project from GitHub by configuring git, using IntelliJ's version control integration, and waiting for Gradle to download dependencies and initialize.
Open the git tool window in IntelliJ IDEA to view local and remote branches and commit history with diffs; filter by user, date, or path.
Switch to a new branch in IntelliJ to develop a web API endpoint, use git checkout to switch, create a local branch, and mark favorites to keep them on top.
You may skip this lecture if you are not interested in the ktor framework.
In this coding exercise, we add a new web endpoint to our ktor project which returns the current time, so that we have some local changes for committing and pushing.
Learn how to commit the new feature using the IntelliJ commit tool window, review diffs before committing, and push commits to a remote branch.
Resolve git conflicts in IntelliJ IDEA by merging diverging branches, viewing conflicts, and applying left or right changes to reconcile routing and time-related names.
Customize the version control color scheme to distinguish changed lines, including blue and green indicators, with options for color blindness and custom colors in the editor settings.
Open local history from the file tree by right-clicking a file or folder to view diffs and recent changes, and quickly revert or restore previous versions.
Explore shelf and stash workflows in IntelliJ: switch branches with local changes, resolve conflicts, and manage multiple change lists by shelving, unshelving, and applying changes later.
Stash changes directly from IntelliJ IDEA using the git menu to uncommitted changes, add an optional message, then review stash entries and apply a selected stash.
Customize pre-commit checks by enabling code reformatting, import optimization, and test runs; choose analyzer profiles and filter checks, enabling a lightweight Scotland profile before committing.
Explore how to amend commits, edit messages, and rewrite history with interactive rebase in IntelliJ, including squashing commits, rewording, and undoing unintended commits before opening a pull request.
Explore git submodules to manage multiple projects with linked repositories, like a JavaScript library used across apps. Learn cloning, updating, and syncing submodules, resolving detached head state, and version bumps.
Master step into and step over to trace method execution in a Java program, using breakpoints and resume to inspect a swap method, fix a minus-plus error, and verify output.
Learn to set a conditional breakpoint inside the swap method in IntelliJ IDEA, so the debugger suspends only when a condition is met, and disable it to resume normal iteration.
Discover non suspending log breakpoints in IntelliJ IDEA 2021 to inspect variables without pausing. Hold shift and click the gutter to enable it, then evaluate values and use filters.
Evaluate expressions at breakpoints, add watches, and change variable values to enter the desired if branch during debugging in IntelliJ IDEA.
Explore debugging Java streams with the Java stream debugger plugin in IntelliJ IDEA 2021 for Java and Kotlin developers. Trace, map, and filter streams, view size changes, and collect results.
In this exemplary debugging session, we analyze a typical issue with concurrent access on seemingly thread safe code. Breakpoint settings can be modified to suspend the current thread only instead of everything. This is often needed in such scenarios.
Learn to alter execution flow and return values in a Java debugging session with IntelliJ IDEA 2021, using breakpoints, simulate exceptions, and force custom returns.
Go to https://www.jetbrains.com/help/idea/pro-tips.html#dcevm for more information on how DCEVM can overcome some reloading limitation sin debugging sessions (mentioned at the end of the lecture).
Learn to display and analyze stack traces from external sources in IntelliJ by pasting the trace, using the analyze stack trace tool, selecting project classes, and navigating to source.
Use the analyze data flow feature in IntelliJ to trace a field's value origin, revealing it is set only in the constructor and connected to the booking class.
I invite you to join my IntelliJ IDEA course, which will not only cover many keyboard shortcuts but also other productivity boosters like strategies for debugging and refactoring - all condensed into a single well structured course.
This course is intended for all software engineers and developers who would like to unlock the full potential of their IDE.
I am using the Ultimate edition of IntelliJ in this course- if you do not have a license then you can either use the 30 day trial version of intelliJ or simply skip the (few) parts which are not applicable to the community edition.
This is a hands-on course - meaning lectures are mostly screencasts with additional explanations. Sample code is provided as a downloadable zip archive so that you can code along with me - this will help you a lot to actually memorize the shortcuts and contents of the course.
The lectures are kept short, so that you can watch them anytime (e.g. during your coffee breaks) and so that you can skip the parts that you already know and re-watch what you forgot.
The course will be updated from time to time when new IDE releases introduce meaningful changes or features.
Feel free to take a look at the free preview videos before enrolling.