An open API service indexing awesome lists of open source software.

https://github.com/dhakalnirajan/java-self-learn

This repository contains what I am learning Java by myself and in the classroom.
https://github.com/dhakalnirajan/java-self-learn

Last synced: 10 months ago
JSON representation

This repository contains what I am learning Java by myself and in the classroom.

Awesome Lists containing this project

README

          

# Java Programs For Learning Myself

This repository contains what I am learning Java by myself and in the classroom.

![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white) 
![Eclipse](https://img.shields.io/badge/Eclipse-2C2255?style=for-the-badge&logo=eclipse&logoColor=white) 
![IntelliJ IDEA](https://img.shields.io/badge/IntelliJIDEA-000000.svg?style=for-the-badge&logo=intellij-idea&logoColor=white) 
![Visual Studio Code](https://img.shields.io/badge/Visual%20Studio%20Code-0078d7.svg?style=for-the-badge&logo=visual-studio-code&logoColor=white) 


Authored By:

![Nirajan Dhakal](https://img.shields.io/badge/Nirajan%20Dhakal-White?style=for-the-badge&logoColor=White&logoWidth=32)


Java is a popular programming language that is used for developing desktop, mobile, and web applications. It is an object-oriented programming language, with capabilities to develop multithreaded applications. It is class-based, with optional typing and type inference. It has gained popularity in years due to its platform independence, large standard library, and support for internet and multimedia applications.

Java is a general-purpose, compiled and interpreted programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run everywhere" meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. The Java language is intended to simplify application development.


Here is a demo "Hello World" program in Java and how to compile and run the program:

```
public class MainClass {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
```


1. Create a new file named MainClass.java and copy the code above.
2. Compile the code by typing the following command in the terminal:

```
javac MainClass.java
```

3. Run the program by typing the following command in the terminal:

```
java MainClass
```


What is necessary to write and run Java Programs?

1. JDK (Java Development Kit)
2. JRE (Java Runtime Environment)
3. Java Source Code
4. Java Compiler


## JDK (Java Development Kit)

The JDK (Java Development Kit) is a software development environment that provides tools for developing Java applications. It includes a Java compiler (javac) and a Java runtime environment (java). The JDK also includes tools for developing, debugging, and monitoring Java applications.


## JRE (Java Runtime Environment)

The JRE (Java Runtime Environment is a software environment that provides tools for running Java applications. It includes a Java virtual machine (JVM). The JRE is the runtime environment for Java applications. It is the environment in which Java applications are executed.


## Java Source Code

Java source code is a text file that contains Java source code. The source code is compiled to produce class files. The class files are then executed by the Java Virtual Machine (JVM).


## Java Compiler

The Java compiler is a program that translates Java source code into class files (bytecode). The Java compiler is invoked by the Java compiler driver program, javac.


## Java Virtual Machine (JVM)

The Java virtual machine (JVM) is a virtual machine that enables a computer to run a Java program. The Java virtual machine interprets Java bytecode. The Java virtual machine is typically used to execute programs that are written in the Java programming language.


## Java Virtual Machine Bytecode

Java bytecode is a low-level code that a Java virtual machine executes. Java bytecode is designed to be easy to interpret and process by a Java interpreter. Java bytecode is designed to be interpreted by a Java interpreter. Java bytecode is designed to be interpreted by a Java interpreter.


## Java Virtual Machine Class Loader

The Java virtual machine class loader is a mechanism for dynamically loading classes into the Java virtual machine. The class loader is responsible for loading classes into the Java virtual machine.


## Java Virtual Machine Garbage Collector

The Java virtual machine garbage collector is a mechanism for automatically reclaiming unused objects in the Java virtual machine. The garbage collector is responsible for reclaiming unused objects in the Java virtual machine. The garbage collector is responsible for reclaiming unused objects in the Java virtual machine.


## Java Virtual Machine Native Interface

The Java virtual machine native interface is a mechanism for loading libraries of code that are written in other programming languages. The native interface is responsible


### How To Install Java Development Kit and Java Runtime Enviroment (Two Ways)

First Way:

1. Download JDK from this link:
2. Install JDK
3. Download JRE from this link:
4. Install JRE


Second Way:

Follow This Blog: [Java Guide - Technology Channel](https://javaguide.technologychannel.org/)