File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public static void main(String[] args) {
4242 }
4343 } else {
4444 // Single, clear not-recognized message + optional suggestion
45- System .out .println ("'" + cmd + "' is not recognized as an internal or external command ." );
45+ System .out .println ("Unknown command: '" + cmd + "'. Enter 'help' to list all available commands ." );
4646
4747 // compute suggestion safely
4848 try {
Original file line number Diff line number Diff line change @@ -22,4 +22,14 @@ public class DateCommand implements Command {
2222 public void execute (String [] args , ShellContext context ) {
2323 System .out .println ("The current date is: " + java .time .LocalDate .now ());
2424 }
25+
26+ @ Override
27+ public String description () {
28+ return "Display current date." ;
29+ }
30+
31+ @ Override
32+ public String usage () {
33+ return "date" ;
34+ }
2535}
You can’t perform that action at this time.
0 commit comments