AMAPstudio

User Tools


The Java training online

Solution of Exercise 1. Create a minimal program

Helping elements

  • package named training → the source code must be located in a directory named training
  • class named Training → the source code must be saved in a file named Training.java
  • a main method → Its signature is conventionally: public static void main(String[] args) {…
  • to write in the terminal, use the statement System.out.println (“some text”);
  • compilation in the terminal from the java/ directory, type javac training/Training.java
  • Execution from the terminal, from the java/ directory, type java training.Training

A possible solution

solution_of_2._create_a_minimal_program.txt · Last modified: 2021/01/25 15:40 by coligny