Answer:
public class num10 {
public static void main(String[] args) {
int h =8;
double g = Math.pow(h,2);
System.out.println("The Squared value of "+h+" is "+g);
}
}
Explanation:
Using Java programming Language, As stated in the question, h is declared as an int and assigned the value of 8.
a variable g is declared and assigned the square of h using java's power method in Math class
The squared value is then outputed to the console.