Question: Please do in java Modify the NumbersDemo application whose main() method holds two integer variables. Assign values to the variables. + In turn, pass each

Please do in java
Modify the NumbersDemo application whose main() method holds two integer variables. Assign values to the variables. + In turn, pass each value to methods named displayTwiceTheNumber(). displayNumber PlusFive(), and displayNumber Squared(). 1 public class NumbersDemo { 2 public static void main (String args[]) { 3 Console.WriteLine(num1 +" times 2 is "+(num1*2) ); 4 Console.WriteLine(num2 + " times 2 is " (num2 * 2)); 5 6 } 7 public static void displayTwiceTheNumber(int n) { 8 // Write your code here 9 } 10 public static void displayNumberPlusFive(int n) { 11 // Write your code here 12 } 13 public static void displayNumberSquared(int n) { 14 // Write your code here 15 16 } 17 } 18 Create each method to perform the task its name implies. An example of the program is shown below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
