Question: Write a complete Java program to declare and initialize two integer variables x and y, assign x = 1, y = 2, compute z=x**2 +
Write a complete Java program to declare and initialize two integer variables x and y, assign x = 1, y = 2, compute z=x**2 + y**2, then print out x, y and z (refer to example code "ComputeAverage.java" on Moodle) J/ Define a class // Main method header /Declare and initialize two integer variable x=1, y=2 Calculate z (you need to declare its type as well) Il display x, y, z
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
