Compare Java with C++

Java - introduction of Java_hive

Compare Java with Java Script

Java - introduction of Java_c++_02

Analyze a class (

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

Java - introduction of Java_hive_03

Java Command

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

javac --> 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";