Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Hello, World

Vasiliy Azarov edited this page Apr 23, 2021 · 2 revisions

This is a fairly simple task and, in my opinion, it does not need additional comments. The only difficulties that may arise here is the installation of the Java Programing Enviroment, but there are a sufficient number of different guides on this topic on the Internet.

The task is as trivial as the previous one, the only improvement in my opinion is to use formatted output instead of the usual one.

System.out.printf("Hello %s and %s.\n", args[0], args[1]);
System.out.printf("Goodbye %s and %s.\n", args[1], args[0]);

The task is pretty simple, except that StdIn.isEmpty() behaved strangely in Intellij IDEA. It did not return true if the console was empty. If you have a similar situation, then to test the correctness of the program, you can display the result immediately instead of assigning it, and vice versa when sending it to the site.

Clone this wiki locally