Simply put, i have to run my program from the command line
My code is:
public static void main( String[] args ) { // check command-line arguments if ( args.length == 2 ) { // get command-line arguments String databaseUserName = args[ 0 ]; String databasePassword = args[ 1 ]; // create new RestaurantBillCalculator RestaurantBillCalculator application = new RestaurantBillCalculator ( databaseUserName, databasePassword ); } else { System.out.println( "Usage: java " + "RestaurantBillCalculator databaseUserName databasePassword" ); } } // end method main
Now everything works in Netbeans but running it from the command line, i get an error message ".java uses unchecked and unsafe operations"
I have added a bit more code to the code above
Just not sure how to run it from the command line, help pleasefor (int i = 0; i < args.length; i++) { System.out.println("args[" + i + "]: " + args[i]); }