Question: Q2. Identify if there is an error(s) or not, if it is correct the errors in each of the following: (4x10=40 points) 1. int i

 Q2. Identify if there is an error(s) or not, if it

Q2. Identify if there is an error(s) or not, if it is correct the errors in each of the following: (4x10=40 points) 1. int i = 3; double ki + i; 2. double i 3.5; int k = Math.pow(1,2); 3. public class test 1 { public static void main(String[] args) { int i; System.out.println(i++); 4. public class Test // the output should be: The result is 5 public static void main(String[] args) { Scanner input-new Scanner(System.in); System.out.println("Please enter an integer:"); int number = input.nextInt(); // Assume that the user enters 5 System.out.println("The result is " + "number"); } } Q3. Write a program that evaluates the following expression: (28 points) r = 3xy + 2x - 3). (%2) for x= 2 and y 4; Using online Java compiler (such as Covida https://www.covidaio or Onlinegdb https://www.onlinegdb.com ), run the above code and show the output? Then manually, solve the equation illustrating each step, and compare your solution with output of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!