Extremely Basic

Read 2 variables, named A and B and make the sum of these two variables, assigning its result to the variable X. Print X as shown below. Print endline after the result otherwise you will get “Presentation Error”.

Input

The input file will contain 2 integer numbers.

Output

Print the letter X (uppercase) with a blank space before and after the equal signal followed by the value of X, according to the following example.
Obs.: don't forget the endline after all.


import java.util.Scanner;
public class Main {

    public static void main(String[] args) throws IOException {
    Scanner input = new Scanner(System.in);
    int A, B;
    A = input.nextInt();
    B = input.nextInt();
 
    int X = A+B;
 
    System.out.println("X = "+X);
    }

}

How to download and install Java SE Development Kit 12 (Zip)

In this tutorial you will learn how to download and install Java SE Development Kit 12 which is the most important tool for java developers, android developers ...

step 1: open the following link to download the program:







step 2: Accept License Agreement  then choose one of them depending on your system, as bellow I selected that for windows OS. It is available for 64-bit of Windows 10, 8, 8.1, 7 and macOS and Linux.



Step 3: Extract the Zip file.

Step 4: Copy the folder (jdk-12.0.1) to Your System Drive (e.g C:\).

Step 5:  Add it to Environment Variables Path.

Step 6: Reboot the machine



Introduction to java


Java is a programming language.It is used to develop mobile apps, web apps, desktop apps, games and much more.

What is Java?

Java is a popular programming language, created in 1995.
It is owned by Oracle, and more than 3 billion devices run Java.
It is used for:
  1. Mobile applications (specially Android apps)
  2. Desktop applications
  3. Web applications
  4. Web servers and application servers
  5. Games
  6. Database connection
  7. And much, much more!

Why Use Java?

  1. Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
  2. It is one of the most popular programming language in the world
  3. It is easy to learn and simple to use
  4. It is open-source and free
  5. It is secure, fast and powerful
  6. It has a huge community support (tens of millions of developers)

Java Example:

public class MyClass {
  public static void main(String[] args) {
    System.out.println("CScientists.com");
  }
}

Where:-

MyClass: The name of the class, in every class there is at most one public class, and it must be the same as the file name.
main: Is one type of  the methods in java, it is to run the program.