SLC S22 Week1 || Getting Started with Java and Eclipse

akmalshakir -

Assalamualaikum my fellows I hope you will be fine by the grace of Allah. Today I am going to participate in the steemit learning challenge season 22 week 1 by @kouba01 under the umbrella of steemit team. It is about Getting Started with Java and Eclipse. Let us start exploring this week's teaching course.




Made with Canva

Write a detailed explanation of the differences between JDK, JRE, and JVM by including their roles, functionalities, and interdependence.

The architecture of Java is made up of three main components: JDK (Java Development Kit), JRE (Java Runtime Environment) and JVM (Java Virtual Machine). Each serves a different purpose, yet they are interdependent, and they work together in order to develop and run Java applications.

Java Development Kit (JDK)

The JDK is the tool used by developers to write, compile, and debug Java programs. It acts as a comprehensive development environment that contains everything necessary for developing Java applications. Key components of the JDK include a compiler for converting Java source code into bytecode, tools for debugging and profiling, and additional utilities for packaging applications. Importantly, the JDK also includes the JRE, which enables developers to test and execute their applications. Without the JDK, creating and building Java applications would not be possible.


Java Runtime Environment (JRE)

The JRE is designed to provide an environment in which Java applications can run. It includes the JVM, core libraries, and native code that interfaces with the underlying operating system. The JRE guarantees that all dependencies like Java class libraries and APIs are available for the proper functioning of applications. Although it enables the execution of Java applications, it does not include tools like the compiler, which are needed for development. This makes the JRE suitable for end-users who simply need to run Java applications but are not involved in their creation.


Java Virtual Machine (JVM)

The JVM is the center of Java's "write once, run anywhere" promise. It is a virtual machine responsible for executing the Java bytecode, which is the platform-independent code generated by the JDK's compiler.

The JVM consists of several key components: the class loader, which loads classes into memory; the bytecode verifier, which checks for compliance with Java's security and language rules; and the execution engine, which translates bytecode into machine-specific instructions using either an interpreter or a Just-In-Time (JIT) compiler. The JVM offers an abstraction layer between the Java program and the hardware, so that the same bytecode can run on any system that is equipped with a compatible JVM.


Interdependence of JDK, JRE, and JVM

These components work together seamlessly to enable both the development and execution of Java applications. The JVM executes Java bytecode, while the JRE provides the libraries and environment needed for the JVM to operate. The JDK, in turn, includes the JRE and adds tools for developers, making it the most comprehensive package.

JVM is the runtime executor, JRE is the execution-support environment, and JDK is the toolkit for writing and running Java programs. It ensures flexibility and efficiency by providing a modular structure for the adoption of Java programs on any platform.


Made with Canva

This is the graphical illustration of the JDK, JRE, and JVM where the JDK is the parent and it is holding other components as child in it to complete the development environment.



Install and Set Up Your Java Development Environment and provide step-by-step screenshots of the installation process, Eclipse configuration.

Let us start setting up the java development environment.

JDK Download

The main page looks like as shown above in the picture.

JDK Installation

As I am a window user now I have to configure the environment variables for the JDK because if I do not set its environment variables I cannot access it in the CMD. So it is necessary task.

Eclipse Download



Write a program that calculates and displays the sum of the first 100 integers. Define the main method in a class named Sum to handle the entire calculation.

First Program

Second Program



Translate, Complete, and Debug the Following Program Named Tax.java



Conversion of character

Here is the java program which can convert the characters from the lowercase to uppercase and similarly uppercase to lowercase and it also checks if the given character is a letter or not.



Array Operations

Here is a complete java program which will perform all the required operations as asked in the question such as finding the largest number of the array, sum of all the numbers of the array and the sorted array.

This is the output of the program. I have double tested the program by giving the array filled with numbers and one array without numbers to check the behaviour of the program. The largest element in the array is 123 which is correct and the sum of the array is also 364 which this program has returned correctly. At the end if we see the order of the array it is also in the ascending order.



I invite @wilmer1988, @josepha, @wuddi to join this learning challenge.