This is part of my code ( I can provide full if needed, just don't want to confuse people). So in my main method I declare a bunch of variables and in my printMessage method, I used the same name in the argument. Is this the correct way or should I change the name of the variable inside the argument to something else? Thanks
public void printMessage(int startMiles1,int endMiles1 , int distance1, int gallons1, double milesGal1 ) { System.out.println("------------------------------------------------------------------------------------"); System.out.printf("%s","09 Acura TL"); System.out.printf("%14d %14d %12d %12d %15.2f\n",startMiles1,endMiles1,distance1,gallons1,milesGal1); } //Main method public static void main(String []args) { //Variables int startMiles1 = 16923; int endMiles1 = 17283; int gallonsUsed1 = 18; double pricePerGallon1 = 3.38; //New Object CarV5 car1 = new CarV5("09 Acura TL", endMiles1, startMiles1, gallonsUsed1, pricePerGallon1); car1.printMessage(startMiles1,endMiles1,distance1,gallonsUsed1, milesGal1);