https://www.oracle.com/id/java/technologies/downloads/#jdk20-windows
java --version
javac --version
Set Environment Variables
Download VS Code: https://code.visualstudio.com/download
Install Extension in VS Code
type:
java create project
Type:
Open Workspace Settings
Text Editors==> Edit in setting json
{
"java.project.sourcePaths": ["src"],
"java.project.outputPath": "bin",
"java.project.referencedLibraries": [
"lib/**/*.jar"
],
"editor.codeActionsOnSave": {
},
"editor.fontSize": 18,
"window.zoomLevel": 0.5,
"terminal.integrated.fontSize": 14,
"workbench.colorTheme" : "Dracula",
"workbench.iconTheme": "vscode-icons",
}
package com.tutorial;
public class Main {
}
Before We Begin
Before we begin the actual coding part, we want to clear a few things.
1. Fear of coding
Programming may feel intimidating for beginners. However, always keep in mind that learning to code is just another skill. If you give it time, you'll master it, no doubt.
2. Programming is a language
Similar to languages like English, programming is also a language in a sense.
You will just need to remember a few instructions and rules. And you can use the same instructions (syntax) to create awesome programs.
3. Math for programming
Learning to code involves a lot of logic and trial-and-error, however, nothing beyond basic arithmetic.
Next, we will start learning the fundamental concepts of Java programming.
By default, the syntax is
class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
for (int i=100;i<==0;i--)
{
//Argument
}
for (int i=0;i<==100;i++)
{
//argument
}
}
}
That is the first step for us!