Create a program called TimesFour.java that defines a method called quadrupler() that accepts a parameter, multiplies that value times 4, and returns the result. Next, overload the method to accept two numbers as parameters; this version will add the two parameters together, multiply that sum times 4, and return the result. Neither version should produce any output.

In the main() method, invoke both versions of the method and output the results. Note that you are not required to accept user input, you just need to demonstrate that both overloads work.

Q&A Education