/** * Demonstrate the use of the printSquare method in ExtraClass. */ public class MainClass { public static void main (String[] args) { double x = 3.0; ExtraClass.printSquare(x); // call to print the square of x } }