I was working on a small project, it's about the game ROCK-PAPER-SCISSORS.
When I finished the code and tried to execute it, I've faced a problem
I was working on a small project, it's about the game ROCK-PAPER-SCISSORS.
When I finished the code and tried to execute it, I've faced a problem
Try to cd into the folder that contains all of these source files, and run your javac
and java
commands from there. It might be with the dot notation you mentioned above.
In main method add if condition, to detect if user has passed paramters. Something like this:- if args.length <1 print no paramters passed. else new nameOfYourClass(args[0], args[1]);
In eclipse you can pass paramters to the main method. Here's [a link] (How to pass console arguments to application in eclipse?)