From the course: IntelliJ IDEA Community Edition Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Store code in scratch files
From the course: IntelliJ IDEA Community Edition Essential Training
Store code in scratch files
- There might be times when you need to temporarily store some code in a file that isn't part of the current project. IntelliJ IDEA lets you create scratch files, code files that are associated with a particular language but are stored as part of your user profile rather than as a part of the project. To create a new scratch file, go to the menu and choose file, new, scratch file. Next, select the language or platform that you want to associate the file with. I'm going to create one that's associated with Java. You get a class named Scratch, and you can pretty much ignore that, and then you can add whatever code you want to this file. I'll go back to my class. Right now, it's called PersonObject, but it could be anything, and I'll scroll down here. And I'm just going to make a copy of this toString method. I'll copy it and I'll paste it and I'll place it here as a member of this class. Now, this method doesn't really…
Contents
-
-
-
-
-
Create new packages, classes, and interfaces1m 30s
-
(Locked)
Generate boilerplate code2m 49s
-
(Locked)
Reformat code and optimize imports4m 34s
-
(Locked)
Navigate code and find files2m 39s
-
(Locked)
Refactor code4m 1s
-
(Locked)
Create and use live templates2m 34s
-
(Locked)
Store code in scratch files2m 22s
-
(Locked)
Challenge: Create a class that represents a data object1m 9s
-
(Locked)
Solution: Create a class that represents a data object3m 10s
-
-
-
-
-
-