File size: 4,758 Bytes
78b4844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
1
00:00:00,000 --> 00:00:03,000
(gentle music)

2
00:00:03,000 --> 00:00:05,000
-: Okay, now let's write our first code.

3
00:00:05,000 --> 00:00:07,000
Hello World in IntelliJ IDEA.

4
00:00:07,000 --> 00:00:08,000
and try the community version.

5
00:00:08,000 --> 00:00:12,000
So I'm going to close the Ultimate version.

6
00:00:12,000 --> 00:00:14,000
It's already closed and now how do we do it?

7
00:00:14,000 --> 00:00:15,000
So very simple.

8
00:00:15,000 --> 00:00:17,000
We open the IntelliJ Idea Community version.

9
00:00:17,000 --> 00:00:18,000
You will see this prompt and by default,

10
00:00:18,000 --> 00:00:21,000
if it is new for you you will not see any of the project

11
00:00:21,000 --> 00:00:22,000
which you can see here.

12
00:00:22,000 --> 00:00:26,000
And now if I click on new project, so basically

13
00:00:26,000 --> 00:00:28,000
whenever you build projects or whenever you write any code,

14
00:00:28,000 --> 00:00:30,000
so there was a days where you used to create

15
00:00:30,000 --> 00:00:33,000
a normal notepad file or a TXT file

16
00:00:33,000 --> 00:00:35,000
where you write your Java code

17
00:00:35,000 --> 00:00:38,000
and then you compile that with the help of the command line.

18
00:00:38,000 --> 00:00:40,000
So we have to create our project,

19
00:00:40,000 --> 00:00:41,000
okay, so what is a project?

20
00:00:41,000 --> 00:00:43,000
A folder where you have different project structure,

21
00:00:43,000 --> 00:00:45,000
different configuration files and all this stuff.

22
00:00:45,000 --> 00:00:46,000
Now since we are writing the first code,

23
00:00:46,000 --> 00:00:48,000
let's not look at the project structure.

24
00:00:48,000 --> 00:00:49,000
So click on the new project.

25
00:00:49,000 --> 00:00:52,000
It will ask you for certain things.

26
00:00:52,000 --> 00:00:53,000
So this, this is the prompt you will get.

27
00:00:53,000 --> 00:00:55,000
Make sure that you are on this new project tab.

28
00:00:55,000 --> 00:00:57,000
And here you can name any project.

29
00:00:57,000 --> 00:00:59,000
So I will say DemoFirst

30
00:01:01,000 --> 00:01:04,000
and you can save this somewhere in your location.

31
00:01:04,000 --> 00:01:07,000
I will just keep this on desktop, path selected.

32
00:01:07,000 --> 00:01:09,000
And now you can choose a language for this project.

33
00:01:09,000 --> 00:01:11,000
So we are running Java, so you can stick to Java,

34
00:01:11,000 --> 00:01:13,000
build system by default, select IntelliJ

35
00:01:13,000 --> 00:01:16,000
will understand what is Maven later.

36
00:01:16,000 --> 00:01:18,000
And then you select your JDK version.

37
00:01:18,000 --> 00:01:20,000
Now depend upon which one you have downloaded.

38
00:01:20,000 --> 00:01:23,000
So if you have 17, 21 you can choose any of it.

39
00:01:23,000 --> 00:01:26,000
I'm going for 21 here and click on Create.

40
00:01:26,000 --> 00:01:29,000
It will create a project for you, a very simple project

41
00:01:29,000 --> 00:01:32,000
and by default you will have this one code.

42
00:01:32,000 --> 00:01:33,000
And by default it will show you hello world.

43
00:01:33,000 --> 00:01:35,000
We just want to see if this works.

44
00:01:35,000 --> 00:01:37,000
So I will just simply say save.

45
00:01:37,000 --> 00:01:41,000
There are some issues in the code, which I can see here,

46
00:01:41,000 --> 00:01:42,000
or simply click on Run.

47
00:01:42,000 --> 00:01:43,000
Okay, no problem.

48
00:01:43,000 --> 00:01:45,000
I don't know what the issue is.

49
00:01:45,000 --> 00:01:46,000
Might be some issue with the ID.

50
00:01:46,000 --> 00:01:49,000
And you can see we we got the output as hello world.

51
00:01:49,000 --> 00:01:51,000
Now at this point, don't stress much on this things.

52
00:01:51,000 --> 00:01:53,000
It is simple, hello world code.

53
00:01:53,000 --> 00:01:56,000
Now in the upcoming videos, whenever you see any topic,

54
00:01:56,000 --> 00:01:59,000
it is by default we are using VS Code there

55
00:01:59,000 --> 00:02:00,000
for the code Java.

56
00:02:00,000 --> 00:02:02,000
And if you want to try and IntelliJ Idea,

57
00:02:02,000 --> 00:02:05,000
just continue with this ID and type the same code.

58
00:02:05,000 --> 00:02:07,000
You will have everything here and with the same output,

59
00:02:07,000 --> 00:02:10,000
of course the output will not change based on the IDs.

60
00:02:10,000 --> 00:02:12,000
So yeah, that's about how do we write our first code

61
00:02:12,000 --> 00:02:13,000
in the IntelliJ.

62
00:02:13,000 --> 00:02:15,000
So you have an option, you can continue with VS Code

63
00:02:15,000 --> 00:02:18,000
or IntelliJ or any of your favorite ID.

64
00:02:18,000 --> 00:02:19,000
Bye.