Hi,
First of all apologies for the newbie question
I am looking to pass a string argument ("localhost") to main by hardcoding without using the debug config inside my IDE. I want to change the following code to do so:
Code:
How do I do this? I tried delcaring a string "localhost" and setting it to args[0], but that doesn't work.
Thank You in advance.
First of all apologies for the newbie question
I am looking to pass a string argument ("localhost") to main by hardcoding without using the debug config inside my IDE. I want to change the following code to do so:
Code:
public static void main (String args[]) { if args.length>0) { DateClient theApp = new DateClient(args[0]); try { ...more code...
How do I do this? I tried delcaring a string "localhost" and setting it to args[0], but that doesn't work.
Thank You in advance.