Java is a programming language created by Sun Microsystems and later baught by Oracle Corp.

Syntax Edit

Java is heavily based on C/C++ therefore their syntax is similar.

Hello World Edit

The hello world program is the most basic program to make. A hello world program is text-based and great for beginners to make. This program is usually the first thing you learn to make when learning java.

This is the code for a basic "Hello, World!" program:

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

The code above prints the text, Hello Wold, on the user's screen.

Complex Edit

A complex Hello World program would be something like this:

 class Hello {
    Public static void main(String[] args){
       String Hello;
       Hello = "Hello World";

The code above displays the text "Hello World" sort of like a hello world program but it uses "Strings" to display the text.

Ints (integers) are the same as strings but do not display words. Instead they display numbers.

Doubles are used the same way as ints but display the exact number, e.g. 3.0089.

To make more advanced programs with Java you can use the import keyword to import more tools to make your program.

The Virtual Machine Edit

What makes Java unique is that it uses a "virtual machine" to compile and interpret the code. That is why you must download the jre (Java runtime environment) to run Java. The jre contains the Java Virtual Machine.


This is a diagram of how the Java Virtual Machine works

Languages (All): C (C++ - C#) - D - Pascal - Java - Perl - Haskell - Ruby - Batch - XML - Objective-C - Seed7 - Go - Assembly - VBscript - Visiual Basic - G - Delphi - Lava - Swift - Rust - Logo - Lisp - SMALL - BASIC - Python - Fourth
Web Languages: HTML - Lua - Javascript - php - SSML - CSS - XML
Tools and Programs: Compiler - Interpreter - JVM - IDE (Netbeans - Eclipse - Visual Basic IDE) - Text Editor (Notepad - Notepad++ - Text Wrangler - Text Edit)
Resources: Rules - Style Guide
Community content is available under CC-BY-SA unless otherwise noted.