Java Syntax

Java Syntax

In the previous chapter, we created a Java file called Main.java, and we used the following code to print “Hello World” to the screen:

Main.java

public class Main {

public static void main(String[] args) {

System.out.println("Hello World");

}

}

 

Continue reading Java Syntax

Java Getting Started

Java Install

Some PCs might have Java already installed.

To check if you have Java installed on a Windows PC, search in the start bar for Java or type the following in Command Prompt (cmd.exe):

C:\Users\Your Name>java -version

If Java is installed, you will see something like this (depending on version):

java version "22.0.0" 2024-08-21 LTS
Java(TM) SE Runtime Environment 22.9 (build 22.0.0+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 22.9 (build 22.0.0+13-LTS, mixed mode)

If you do not have Java installed on your computer, you can download it for free at oracle.com. Continue reading Java Getting Started

Java Introduction

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:

  • Mobile applications (specially Android apps)
  • Desktop applications
  • Web applications
  • Web servers and application servers
  • Games
  • Database connection
  • And much, much more!

Continue reading Java Introduction