Noob question JAVA
Go to solution
Solved by MrSuperb,
class Welcome { public static void main (String[] arg) { System.out.println("Welcome " + arg[0] + "!") ; }}
arg (short for arguments) is a String array which contains the arguments you parse in the console.
e.g. if you write
java Welcome Scia
Scia is stored in arg[0] ... the first place in the arg array
-
Featured Topics
-
Topics
-
GoStormPlays ·
Posted in WHALE LAN0 -
GoStormPlays ·
Posted in General Discussion1 -
4
-
jordan_wills ·
Posted in New Builds and Planning0 -
5
-
xJDL ·
Posted in Troubleshooting1 -
Marie Rose ·
Posted in Power Supplies11 -
8
-
7
-
8
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now