JAVA- Write a method named printDouble that takes a double, num, parameter followed by an

JAVA- Write a method named printDouble that takes a double, num, parameter followed by an integer, n, parameter and prints num n times.
For example, printDouble(2.5, 2) would print the following:
2.5
2.5
You can call your method in the program’s main method so you can test whether it works, but you must remove or comment out the main method before checking your code for a score.