Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package commandLineArgs;
- public class Greeting {
- public static void main(String[] args) {
- System.out.println("Hello " + args[0]);
- System.out.println("Hello " + args[1]);
- }
- }
- /* Using command line arguments
- * main method accepts inputs through the String[] args array and uses it to produce output
- * Go to class > Run configurations
- * > Arguments tab - type values in Program arguments (no comma but type in next line)
- * > click Apply and Run
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement