Compare Java with C++

Java - introduction of Java_hive

Compare Java with Java Script

Java - introduction of Java_java_02

Analyze a class (Main.java)

package com.example;
public class Main() {
public static void main(String[] args) {
System.out.println("Hello World");
}
}

Java - introduction of Java_c++_03

Java Command

  • java: runtime
  • javac: compiler
  • javadoc: docs builder
  • jar: archive builder

javac Main.java --> generate Main.class

java Main ---> run Main.class --> output: Hello World

Identifier Conventions

  • Class start with uppercase character: class MyClass
  • Methods and variables start with lowercase character:void doSomething(String withThis) {}
  • Constants are full uppercase:final String FIRSTNAME = "David";