After you have typed this in you will see an error notation


Given the code below, create a new Java application called Lab1Part4. In this example we are going to use functions that are already written. They are stored in Java libraries and in order to use them, we have to tell Java to "import" the definitions from their libraries. Note that the import statements need to be before the class header "public class..." but after a package header (if there is one.) NetBeans will help you figure out what import statements you need. [Yay, NetBeans!] In the main routine of the project you just made, type the code below.

Scanner myscanner = new Scanner(System.in);
int a;
int b;
System.out.print("Please enter a number ");
a = myscanner.nextInt();
System.out.print("Please enter another number ");
b = myscanner.nextInt();
double c = Math.pow(a, b);
System.out.println("Value = "+c);

After you have typed this in, you will see an error notation on the left side.

What does the program do? Describe the mathematical action that is being implemented

Solution Preview :

Prepared by a verified Expert
JAVA Programming: After you have typed this in you will see an error notation
Reference No:- TGS02387062

Now Priced at $15 (50% Discount)

Recommended (90%)

Rated (4.3/5)