solution_of_1._create_a_minimal_program
The Java training online
Solution: 1. Create a minimal program
Try to work with the helping elements before looking at the solution…
Helping elements
- package named
training
→ the source code must be located in a directory namedtraining
- package named
training
→ the first statement in the class must bepackage training;
- class named
Training
→ the source code must be saved in a file namedTraining.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, typejavac training/Training.java
- execution from the terminal, from the
java/
directory, typejava training.Training
A possible solution
solution_of_1._create_a_minimal_program.txt · Last modified: 2021/12/13 09:28 by 127.0.0.1