[Solved] Whats the difference between java parameters and clarifying it within the method
[ad_1] Parameters allows a method to have more flexibility. Sometimes it is necessary to run a method but with different arguments, this is where parameters become handy. For Example (Clarifying): public void calcTotal() { int firstNum= 1; int secondNum=2; System.out.println(firstNum+secondNum); //when we run calcTotal() //output= 3 } This method would correctly print the sum of … Read more