Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions HelloApp.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
public class HelloApp {
public static void main(String[] args) {
String message;

if (args.length > 0) {
System.out.println("Hello, " + args[0] + "!");

Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a whitespace-only blank line inside the if-block; please remove the trailing spaces (or the extra blank line) to avoid noisy diffs and keep formatting clean.

Suggested change

Copilot uses AI. Check for mistakes.
String names = String.join(", ", args);
message = "Hello, " + names + "!";
Comment on lines +7 to +8
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change alters behavior: previously only args[0] was greeted, but now all command-line arguments are joined and included in the greeting. If the PR is intended to be a pure refactor (per title), consider reverting to args[0] or updating the PR title/description to reflect the new multi-name behavior.

Copilot uses AI. Check for mistakes.
} else {
System.out.println("Hello, World!");
message = "Hello, World!";
}

System.out.println(message);
}
}
Loading