1 00:00:01,860 --> 00:00:06,810 OK, in this lecture, we are going to write your first Java program, but we are not going to go into 2 00:00:06,810 --> 00:00:07,700 very details. 3 00:00:07,710 --> 00:00:12,870 Now, it will be a simple program which will display a text on the screen. 4 00:00:13,290 --> 00:00:18,630 The goal of this lecture is to make sure that everything is installed correctly and you're going to 5 00:00:18,630 --> 00:00:19,800 be able to run. 6 00:00:19,800 --> 00:00:22,420 The code is shown in the upcoming lectures. 7 00:00:23,070 --> 00:00:27,670 I suggest you code long now and I will make it all clear in the next video. 8 00:00:28,470 --> 00:00:33,810 So JDK and A.J. are installed and we are in college now. 9 00:00:34,330 --> 00:00:36,120 So here, click on New Project. 10 00:00:37,850 --> 00:00:47,330 Then select Java on the left, if it is not selected up here, you can see Amazon, Croteau 15 or 11 11 00:00:47,330 --> 00:00:47,990 or eight. 12 00:00:47,990 --> 00:00:50,600 It depends on which version you installed. 13 00:00:51,080 --> 00:00:57,710 And if you cannot see any of those, click on here and click on Add JDK. 14 00:00:59,270 --> 00:01:03,140 On Windows, you need to search for Amazon creator FALDER. 15 00:01:04,460 --> 00:01:13,340 And inside of it, JDK 11 or 15, and you have to select the folder and click on, OK, you can also 16 00:01:13,340 --> 00:01:17,880 see the folders that you need to select for other operating systems here. 17 00:01:18,380 --> 00:01:23,860 I'm going to click on console now, and there is nothing else we need to select here. 18 00:01:24,140 --> 00:01:30,410 So click on Next on the next page, we have an option to create a project from a template. 19 00:01:30,800 --> 00:01:33,200 We will use this feature in the upcoming lectures. 20 00:01:33,410 --> 00:01:38,910 But we go the hard way now because I want to show you how to build a project from zero. 21 00:01:39,290 --> 00:01:41,000 So click on next. 22 00:01:41,660 --> 00:01:44,120 So here you have to type in the name of the project. 23 00:01:44,450 --> 00:01:51,470 I suggest you to start every word of the project name with lowercase and separate the words with dashes. 24 00:01:51,830 --> 00:02:03,050 So like here my dash first dash Java Dash project or program. 25 00:02:04,290 --> 00:02:10,950 I also suggest you to put the projects into a new directory, for me it is the complete Java course, 26 00:02:11,580 --> 00:02:17,190 and if you selected the folder and gave name to the project, click on Finish here. 27 00:02:18,210 --> 00:02:21,990 And then click on CREATE to create the folder for the project. 28 00:02:26,620 --> 00:02:34,840 OK, so you should see the created project on the left, so click on this little arrow at the top here 29 00:02:35,200 --> 00:02:43,720 and you can see a DOT idea folder at the top, which was generated by intelligent than a or or source 30 00:02:43,720 --> 00:02:46,720 folder where we will create our Java files. 31 00:02:47,260 --> 00:02:55,030 There is also a my first Java project, IMO, which was also generated by intelligence to create our 32 00:02:55,030 --> 00:02:56,020 first Java file. 33 00:02:56,110 --> 00:02:56,590 Right. 34 00:02:56,590 --> 00:02:58,200 Click on the source folder. 35 00:02:59,590 --> 00:03:07,630 Than you and Java class now we need to name the class in the name of the class, every single word starts 36 00:03:07,630 --> 00:03:09,290 with an uppercase. 37 00:03:09,310 --> 00:03:14,650 So like my first Java. 38 00:03:17,770 --> 00:03:23,440 It is more like a business standard than a rule, so you can start with lower case as well, but using 39 00:03:23,440 --> 00:03:29,890 this naming style shows that you have some sort of advanced knowledge in how job fairs should be named. 40 00:03:30,220 --> 00:03:32,710 If we are finished, we need to hit enter. 41 00:03:34,020 --> 00:03:41,370 As you can see, intelligence has already generated a few lines of code for us, so public class, my 42 00:03:41,370 --> 00:03:48,840 first Java app and curly braces, as you can see, the filename and the text here, the class name is 43 00:03:48,840 --> 00:03:49,460 the same. 44 00:03:49,470 --> 00:03:50,640 It is really important. 45 00:03:51,100 --> 00:03:55,170 OK, so as I said, we are not going to go into very details now. 46 00:03:55,170 --> 00:03:59,610 We are just simply typed in a code which will print out a text. 47 00:04:00,060 --> 00:04:09,240 So next in the curly braces hit enter just to create some space and here start typing in public. 48 00:04:09,570 --> 00:04:12,260 And as you can see, it is very handy. 49 00:04:12,420 --> 00:04:14,760 You don't need to type in all the letters. 50 00:04:15,000 --> 00:04:19,080 You can select the desired code from the list and hit enter. 51 00:04:20,160 --> 00:04:27,150 The next one is static and enter again, then void. 52 00:04:28,780 --> 00:04:38,110 And finally here, Maine, now we need to add a left parentheses and as you can see, intelligence added 53 00:04:38,260 --> 00:04:43,300 the right one as well and in the parentheses string. 54 00:04:44,790 --> 00:04:53,490 Left square bracket, and as you can see, the right one is added and then a space and args and after 55 00:04:53,490 --> 00:04:59,710 the parentheses we need to add a left curly brace and the right one is added as well. 56 00:05:00,000 --> 00:05:01,800 And I'm going to hit enter here. 57 00:05:02,490 --> 00:05:09,390 OK, so this whole line is a special function that shows the Java that the execution of the code should 58 00:05:09,390 --> 00:05:10,680 start from here. 59 00:05:11,400 --> 00:05:13,900 OK, so one more line left from here. 60 00:05:14,130 --> 00:05:25,230 So start typing in system dot out dot printer line, which means print line. 61 00:05:26,140 --> 00:05:27,760 So we're going to print out a line. 62 00:05:28,920 --> 00:05:35,470 And in the parentheses, double quotes and as you can see, another one is added as well. 63 00:05:35,730 --> 00:05:39,980 So in the double quotes, we have to type in the text we would like to print out. 64 00:05:40,320 --> 00:05:47,970 So I will type and may the force be with you. 65 00:05:48,780 --> 00:05:50,910 OK, so we are finished with Colleen. 66 00:05:51,180 --> 00:05:54,020 As you can see, there are green arrows on the left. 67 00:05:54,270 --> 00:05:56,460 It doesn't really matter which one you choose. 68 00:05:56,760 --> 00:06:00,660 Click on one of them and select the run option. 69 00:06:02,510 --> 00:06:08,990 OK, the text we brought in should appear at the bottom of the screen, which shows the console outputs, 70 00:06:09,410 --> 00:06:16,880 and under that you can see the process finished with an exit code zero, which means everything went 71 00:06:16,880 --> 00:06:17,250 fine. 72 00:06:17,750 --> 00:06:22,360 OK, so in the next lecture, I will explain all the elements presented here. 73 00:06:22,850 --> 00:06:26,480 If you run into an error, please check this video again. 74 00:06:26,480 --> 00:06:32,330 Maybe you missed something, but if you cannot figure out what went wrong, let me know and I will help 75 00:06:32,330 --> 00:06:33,260 you to resolve it. 76 00:06:33,770 --> 00:06:34,950 So that's it. 77 00:06:35,270 --> 00:06:36,500 See you in the next video.