1 00:00:00,590 --> 00:00:04,570 We've just created our first project using an IDE. 2 00:00:04,570 --> 00:00:09,660 Now let's dive in and see how much better programming can be with the right tools. 3 00:00:09,660 --> 00:00:12,480 But first, we've got the tip of the day. 4 00:00:12,480 --> 00:00:16,000 You can turn this off by unchecking this box, but for 5 00:00:16,000 --> 00:00:18,750 now, let's leave them on and just hit close. 6 00:00:20,210 --> 00:00:23,040 Here we are in IntelliJ IDEA. 7 00:00:23,040 --> 00:00:28,520 On the left is the Project pane, and on the right is where we write our code. 8 00:00:28,520 --> 00:00:30,250 Let's start with the Project pane. 9 00:00:30,250 --> 00:00:33,760 This area shows us all the files that make up our project. 10 00:00:34,810 --> 00:00:37,873 If we drill into MyFirstProject, 11 00:00:37,873 --> 00:00:42,942 we can see that our project is made up of on .idea folder, 12 00:00:42,942 --> 00:00:47,497 an src folder, and on MyFirstProject.iml file. 13 00:00:47,497 --> 00:00:52,128 The .idea folder and the MyFirstProject.iml file are just 14 00:00:52,128 --> 00:00:56,770 setting for IntelliJ, leaving us with just the src folder. 15 00:00:56,770 --> 00:01:01,008 Which stands for source and is where we keep our source code. 16 00:01:01,008 --> 00:01:08,257 Inside this folder, we have two more folders, com and teamtreehouse. 17 00:01:08,257 --> 00:01:13,403 But since the only thing in the com folder is the teamtreehouse folder, 18 00:01:13,403 --> 00:01:16,937 it gets shortened to just com.teamtreehouse. 19 00:01:16,937 --> 00:01:21,912 And inside the treehouse folder, We finally have our main.java file. 20 00:01:21,912 --> 00:01:24,971 Though, since most of our files will be Java files, 21 00:01:24,971 --> 00:01:28,110 it doesn't show the .java part in the Project pane. 22 00:01:28,110 --> 00:01:33,293 To help remember all of that, let's look at it one more time in the File Explorer. 23 00:01:33,293 --> 00:01:37,037 Let's right click on the top level my first project folder and 24 00:01:37,037 --> 00:01:40,390 pick the option to open it in the File Explorer. 25 00:01:40,390 --> 00:01:47,530 For me, it's Reveal in Finder, and here we can see all our project files. 26 00:01:49,158 --> 00:01:54,280 Though the .idea folder is hidden by default since it starts with a period. 27 00:01:54,280 --> 00:01:59,270 Digging in to our source folder, we can see that we do indeed have a com folder, 28 00:02:00,750 --> 00:02:06,970 a teamtreehouse folder and a Main.java file, awesome. 29 00:02:06,970 --> 00:02:09,800 Now that we know what files make up our project and 30 00:02:09,800 --> 00:02:14,086 where those files are stored, let's get back to IntelliJ and start coding. 31 00:02:14,086 --> 00:02:18,895 On the right side of the screen, let's delete the comment, 32 00:02:18,895 --> 00:02:22,950 and then try printing the words, java is awesome, 33 00:02:22,950 --> 00:02:26,932 using the print line function from System.out. 34 00:02:26,932 --> 00:02:34,110 Let's delete the comment, and then start typing the word System with a capital S. 35 00:02:34,110 --> 00:02:37,680 And notice that it's trying to guess what you're typing, 36 00:02:37,680 --> 00:02:42,850 this is called code completion and it is awesome. 37 00:02:42,850 --> 00:02:45,610 You can use the arrow keys to move up and down this list. 38 00:02:47,080 --> 00:02:49,530 All you need to do is hit Enter on the right one. 39 00:02:50,700 --> 00:02:54,270 So once you've got System highlighted, hit Enter to select it. 40 00:02:54,270 --> 00:03:00,527 Then type a dot and an o and select out. 41 00:03:00,527 --> 00:03:03,666 And for print line, add another dot, 42 00:03:03,666 --> 00:03:07,799 and then you can either type it out or just type pl. 43 00:03:07,799 --> 00:03:12,609 That's right, if you've got something that's more than one word, you can just 44 00:03:12,609 --> 00:03:17,480 type the first letter of each word, and IntelliJ will figure out the rest. 45 00:03:17,480 --> 00:03:21,300 So let's hit Enter, and it even adds the semicolon. 46 00:03:21,300 --> 00:03:24,220 All we need to do is add our message as an argument. 47 00:03:25,500 --> 00:03:29,975 So let's type, Java is awesome, end quotes and 48 00:03:29,975 --> 00:03:35,120 then to run the program, click the Play button up here. 49 00:03:38,722 --> 00:03:43,872 And at the bottom we'll see our message, Java is awesome. 50 00:03:43,872 --> 00:03:46,853 This section at the bottom is the Run window. 51 00:03:46,853 --> 00:03:50,014 It's where we'll see any output of our program. 52 00:03:50,014 --> 00:03:54,641 You can hide and show the Run window by clicking this 53 00:03:54,641 --> 00:03:58,951 button down here, or hitting Cmd or Ctrl+4, 54 00:04:02,448 --> 00:04:06,206 You can also hit Cmd or Ctrl+1 to hide the Project pane. 55 00:04:10,367 --> 00:04:14,260 Also you can toggle having all these buttons around the outside, 56 00:04:14,260 --> 00:04:15,757 by clicking right here. 57 00:04:20,114 --> 00:04:23,778 So if for some reason you're missing the project button, 58 00:04:23,778 --> 00:04:27,060 just click down here to get it back, nice. 59 00:04:27,060 --> 00:04:30,710 In the next video, we'll get more comfortable with IntelliJ by 60 00:04:30,710 --> 00:04:33,050 adding a class and learning about packages.