Java

Java

Java is a general-purpose programming language intended to let application developers write once and run anywhere.

Migrating from the `javax` to `jakarta` namespace

Tutorial

Migrating from the `javax` to `jakarta` namespace
How to transition your application from Java EE to Jakarta EE.
Presenting with IntelliJ IDEA.

Tutorial

Presenting with IntelliJ IDEA.
Tips & tricks to level up your presentation skills with IntelliJ IDEA.
Hello World in IntelliJ IDEA

Tutorial

Hello World in IntelliJ IDEA
Create a new Java application and JAR file that prints `Hello World` to the console.
Working with Gradle

Tutorial

Working with Gradle
Understand how IntelliJ IDEA integrates with Gradle.
Working with Maven

Tutorial

Working with Maven
Understand how IntelliJ IDEA integrates with Maven.
Command in chat

Tip

Command in chat
Use predefined command in chat.
Inline code completion

Tip

Inline code completion
Let AI Assistant write code for you, using inline code completion.
Create an Editor Fold

Tip

Create an Editor Fold
Create an editor fold to hide parts of your class which can make it more readable.
Generate Overrides for equals(), hashCode() and toString()

Tip

Generate Overrides for equals(), hashCode() and toString()
We can generate the code to override the equals and hashCode methods.
Surround With

Tip

Surround With
Surround your code with common programming constructs.
View supertype and subtype hierarchy

Tip

View supertype and subtype hierarchy
You can view supertypes and subtypes in the hierarchy quickly with your keyboard shortcuts.
Convert Class to Record

Tip

Convert Class to Record
Use inspections to convert classes to Java 16 records.
Enable Git Staging

Tip

Enable Git Staging
Git Staging is an alternative approach to IntelliJ IDEA Changelists.
Create New Class

Tip

Create New Class
Quickly add new classes to your project.
Explain Regexp with AI Assistant

Tip

Explain Regexp with AI Assistant
Using AI Assistant to help you understand regexp.
Generate code with AI Assistant

Tip

Generate code with AI Assistant
Let AI Assistant write code for you, based on your prompts.
Extend Selection

Tip

Extend Selection
Extend and shrink your current code selection.
Mnemonic bookmark

Tip

Mnemonic bookmark
Use mnemonic bookmarks for easy navigation.
Run inspection

Tip

Run inspection
Run inspection by name. For example, run Vulnerable API usage to see where the vulnerable API of external dependencies is used in your code.
Custom prompts

Tip

Custom prompts
Use a custom prompt to let AI Assistant help you.
Extract Method

Tip

Extract Method
Extract code to a new method.
Presentation Assistant

Tip

Presentation Assistant
Use Presentation Assistant to display shortcuts being used.
Vulnerable API Usage

Tip

Vulnerable API Usage
See whether you are using the vulnerable API of a dependency.
Download a JDK

Tip

Download a JDK
Download or Associate a JDK With Your Project.
Generate constructors and accessor methods

Tip

Generate constructors and accessor methods
Quickly generate common code constructs such as Constructors, Getters and Setters.
Generate a UML diagram

Tip

Generate a UML diagram
IntelliJ IDEA Ultimate allows you to generate UML diagrams.
Commit Changes

Tip

Commit Changes
Commit your changes to VCS as you go.
Disable Usages

Tip

Disable Usages
Disable the inlay hint for Usages if it's distracting you.
AI Assistant Chat

Tip

AI Assistant Chat
You can chat with JetBrains AI Assistant right inside the IDE.
Find in File

Tip

Find in File
Find a specific name or string in your file.
Generate Unit Tests

Tip

Generate Unit Tests
Generate unit tests with AI Assistant.
Toggle Rendered View

Tip

Toggle Rendered View
Toggle rendered view for one or all Javadoc comments.
AI Actions

Tip

AI Actions
View and use AI Actions in the editor.
Close Tabs

Tip

Close Tabs
Close inactive tabs so you an focus on your current working context.
Expand and Collapse Code

Tip

Expand and Collapse Code
Quickly view specific parts of a class by expanding or collapsing code blocks.
Move Statement

Tip

Move Statement
Move a statement up or down within the same scope.
Explain Runtime Error with AI Assistant

Tip

Explain Runtime Error with AI Assistant
Let AI Assistant explain runtime errors to you.
Interactive Rebase

Tip

Interactive Rebase
Clean up your commit history by using interactive rebase in IntelliJ IDEA.
Write Documentation with AI Assistant

Tip

Write Documentation with AI Assistant
Generate documentation for your code with AI Assistant.
Dependency Matrix

Tip

Dependency Matrix
Explore project structure with the Dependency Matrix.
Import Multiple Repositories

Tip

Import Multiple Repositories
Import multiple related repositories into one IntelliJ IDEA project.
Optimize imports

Tip

Optimize imports
Remove unused imports from your code with one keyboard shortcut.
Rename Bookmark

Tip

Rename Bookmark
Rename an existing bookmark to something more suitable.
CamelCase in Code Completion

Tip

CamelCase in Code Completion
Use CamelCase in code completion to speed up your workflow.
Generate a Test Class

Tip

Generate a Test Class
Generate a new test class from your Java class.
Inline Variable

Tip

Inline Variable
Sometimes inlining a variable can make your code more readable.
Introduce Variable

Tip

Introduce Variable
Refactor your code and introduce a new variable right when you need it.
Postfix Completion

Tip

Postfix Completion
Postfix completion allows you to keep typing forwards, it minimises the amount of time you spend moving the cursor around while you're coding.
Live Templates

Tip

Live Templates
Use Live Templates to auto-complete common code structures for you.
Debugging Streams

Tip

Debugging Streams
Visualize the flow of data through a Java stream.
Understanding the Debugger

Tip

Understanding the Debugger
Use the debugger to help you understand what your code is doing.
Recent Files & Locations

Tip

Recent Files & Locations
Quickly navigate around your recent files & locations to stay in your current working context.
Clipboard History

Tip

Clipboard History
Paste a subset or multiple entries such as a list from your recent copy history.
Data Flow Analysis

Tip

Data Flow Analysis
Data flow analysis can show us potential errors in our code logic.
Go to Next Error

Tip

Go to Next Error
Quickly move to the next (or previous) error or warning in the file.
Find in Files

Tip

Find in Files
Find a specific string in (a subset of files in) your code.
Inlay Hints

Tip

Inlay Hints
Inlay hints provide additional information about your code.
Structural Search

Tip

Structural Search
Structural Search and Replace is very helpful for finding exactly what you need in your project.
Context Actions

Tip

Context Actions
There are numerous ways to use Context Actions, let's explore some of them.
Generate Code

Tip

Generate Code
Helps you to generate commonly used code constructs.
Navigate to Test

Tip

Navigate to Test
Go to your matching test class with one keyboard shortcut.
Navigating Forward & Backward

Tip

Navigating Forward & Backward
Move forward and backward between your locations in the code so you don't need to have tabs open.
Explore project structure with the Dependency Matrix

Tutorial

Explore project structure with the Dependency Matrix
Exploring project structure with the Dependency Matrix in IntelliJ IDEA.
Introduction

Part of tutorial

Introduction
Explore project structure with the Dependency Matrix.
Interpret the Dependency Matrix

Part of tutorial

Interpret the Dependency Matrix
How to interpret the Dependency Matrix.
Opening the Dependency Matrix

Part of tutorial

Opening the Dependency Matrix
Opening the Dependency Matrix for your project.
Summary and Shortcuts

Part of tutorial

Summary and Shortcuts
Explore project structure with the Dependency Matrix Summary.
Extract Variable

Tip

Extract Variable
Extract code to a variable
Getting started with IntelliJ IDEA

Tutorial

Getting started with IntelliJ IDEA
My favourite tips for all new starters in IntelliJ IDEA.
Marco Codes - Building a Text Editor

Tutorial

Marco Codes - Building a Text Editor
How to build a terminal-based text editor with Java.
Highlighted Commands in the Terminal

Tip

Highlighted Commands in the Terminal
Have you ever wondered which IntelliJ IDEA terminal commands you can run in IntelliJ IDEA?
Inspections Widget

Tip

Inspections Widget
The top-right corner of your editor shows you information about the state of your class at a glance.
Restore a Deleted Breakpoint

Tip

Restore a Deleted Breakpoint
You can restore previously configured breakpoints if you accidentally delete them.
Built in Spell Checking

Tip

Built in Spell Checking
IntelliJ IDEA can spell check and fix errors for you allowing you to focus on problem solving.
Merge/Unmerge If Statements

Tip

Merge/Unmerge If Statements
Experiment with your code without changing the semantics.
Code Completion for the Stream API

Tip

Code Completion for the Stream API
IntelliJ IDEA can add the stream() call meaning less typing for you.
Navigating a Long Class

Tip

Navigating a Long Class
There are various tips and tricks you can use to navigate a long class in IntelliJ IDEA.
Navigate to the Last Edited Location

Tip

Navigate to the Last Edited Location
Move around the files you're working on quickly with keyboard shortcuts.
Add Your Favourite Photo as a Background

Tip

Add Your Favourite Photo as a Background
If you want to look at your favourite photo while coding you can set it as your background image.
Determining the Return Type of Expression

Tip

Determining the Return Type of Expression
Type Info is very helpful on a per-expression basis to understand your code.
Edit a Document in IntelliJ IDEA LightEdit Mode

Tip

Edit a Document in IntelliJ IDEA LightEdit Mode
Use IntelliJ IDEA’s text editing features without creating or opening a dedicated project.
Inject a Language

Tip

Inject a Language
Language injections let you work with pieces of code in other languages embedded in your code.
Pattern Matching for Switch

Tip

Pattern Matching for Switch
This feature is available in preview from Java 17.
New Line

Tip

New Line
Start a new line below or above your current line with the correct indentation.
In Editor Doc Rendering

Tip

In Editor Doc Rendering
You can render Javadocs directly in the editor including HTML tags, images and links.
Writing Less Code With Live Templates

Tutorial

Writing Less Code With Live Templates
How you can use live templates to get IntelliJ IDEA to write more code for you.
Rearranging Code in IntelliJ IDEA.

Tutorial

Rearranging Code in IntelliJ IDEA.
How you can rearrange code in your classes and projects
Reformatting Code in IntelliJ IDEA.

Tutorial

Reformatting Code in IntelliJ IDEA.
Why and how you can reformat code in your projects
Using the Terminal in IntelliJ IDEA

Tutorial

Using the Terminal in IntelliJ IDEA
IntelliJ IDEA has a built-in terminal that you can use to perform a number of functions inside your IDE.
Migrating JUnit 4 to JUnit 5

Tutorial

Migrating JUnit 4 to JUnit 5
Migrating your JUnit 4 test suite to JUnit 5.
Getting Started with IntelliJ IDEA

Playlist

Getting Started with IntelliJ IDEA
Helpful tips for working with IntelliJ IDEA for the first time.
Join Lines

Tip

Join Lines
Join lines of code together in your IDE.
CamelCase in Searching

Tip

CamelCase in Searching
Use CamelCase to find what you need faster and save your fingers.
Smart Completion

Tip

Smart Completion
Get type aware completion in your code so you can focus on solving problems.
Getting Started with Spring Data JPA

Tutorial

Getting Started with Spring Data JPA
Learn how to use Spring Data JPA to store and retrieve data from your database.
Generate Test Methods

Tip

Generate Test Methods
Generate a test method in your test class.
Type Into Any Dialog to Search

Tip

Type Into Any Dialog to Search
You can start typing into a dialog box to search, even if there's not a textual search box available.
Writing Tests with Spock

Tutorial

Writing Tests with Spock
Learn about the Spock testing framework by creating a project that uses Spock to unit test Java code.
Your First Spring Boot Application

Tutorial

Your First Spring Boot Application
In this tutorial, we will use IntelliJ IDEA to create your first "Hello World" Spring Boot application.
Profile your Application

Tip

Profile your Application
See how your application is performing with the built-in profiler.
Run your code with Docker, SSH or WSL

Tip

Run your code with Docker, SSH or WSL
Set a Run Target to change where your code runs.
Lightweight Inspection Profile on Commit

Tip

Lightweight Inspection Profile on Commit
Fully customise the checks you must perform before you commit your changes to version control.
Create a Correct Child Sealed Class

Tip

Create a Correct Child Sealed Class
Sealed types are a new idea for Java developers, let IntelliJ IDEA guide you in how to create child classes.
Create a Correct Parent Sealed Class

Tip

Create a Correct Parent Sealed Class
Sealed types are a new idea for Java developers, let IntelliJ IDEA guide you in how to use them.
Turn on Preview Features to try new Java Features

Tip

Turn on Preview Features to try new Java Features
The latest versions of Java contain "Preview Features", features that are fully functional but require developer feedback. Try them out in IntelliJ IDEA.
Convert from Record

Tip

Convert from Record
Use quick intentions to convert a record to a class.
Create Record

Tip

Create Record
Let IntelliJ IDEA support you in creating a new Java record class.
Identify and Fix Deprecated Calls

Tip

Identify and Fix Deprecated Calls
IntelliJ IDEA will warn you if you're using deprecated methods, and they will be shown with a strikethrough if they're marked for removal.
Use Pattern Matching for instanceof

Tip

Use Pattern Matching for instanceof
Inspections can guide us to use newer Java features.
Using the IDE Feature Trainer.

Tutorial

Using the IDE Feature Trainer.
Learning new things in the IDE
Add a  Breakpoint

Tip

Add a Breakpoint
Easily add breakpoints when you get an exception in your code
Adjust Code Style

Tip

Adjust Code Style
Use quick intentions to adjust the style of your code right where your cursor is.
Add Overload Bool

Tip

Add Overload Bool
Refactor a method to change its signature and update your code to reflect the new signature.
Assert That Import

Tip

Assert That Import
Use quick intentions to manage imports and keep your code compiling.
Change Method Signature

Tip

Change Method Signature
Refactor the signature of a method at any time.
Remove Unnecessary Condition

Tip

Remove Unnecessary Condition
Use quick intentions to remove redundant code so it's not cluttering up your codebase.
Drag and Dock Editor Tabs

Tip

Drag and Dock Editor Tabs
You can move editor tabs around as required to suit your needs.
Enable Machine Learning for Code Completion

Tip

Enable Machine Learning for Code Completion
Code completion may be enhanced with Machine Learning.
Exclude a Completion Option

Tip

Exclude a Completion Option
Helps to reduce options that are not relevant for your code.
Extract Field

Tip

Extract Field
Extract code to a field.
Extract Constant

Tip

Extract Constant
Extract a value to a constant.
Extract Parameter

Tip

Extract Parameter
Extract code to a parameter.
Find Next Word

Tip

Find Next Word
Find next word and highlight all instances.
Find Usages

Tip

Find Usages
Use Find Usages to search for references in your code base.
Inline a Method

Tip

Inline a Method
Sometimes inlining a method can improve the readability of your code.
Meaningless Arguments

Tip

Meaningless Arguments
Use quick intentions to remove redundant code so it's not cluttering your codebase.
Move Line

Tip

Move Line
Move a line throughout your class, but watch out for errors!
Replace With var

Tip

Replace With var
Use quick intentions to replace a local variable type with `var`.
Rename an Interface

Tip

Rename an Interface
Renaming in IntelliJ IDEA including comments and texts.
Run in Current Context

Tip

Run in Current Context
Run just a file or a single script.
Show Virtual Whitespace

Tip

Show Virtual Whitespace
Add virtual whitespace to the bottom of a file so you can scroll to the end half way up your screen.
Refactor an Unreachable Statement

Tip

Refactor an Unreachable Statement
Use quick intentions to remove redundant code.
IntelliJ IDEA Welcome Screen

Tip

IntelliJ IDEA Welcome Screen
Get a project from source control, open an existing project, or create a new project.
Writing JUnit 5 Tests

Tutorial

Writing JUnit 5 Tests
Writing JUnit 5 Tests from start to finish.