public class Output1 { /* ------------------------------------------------------- Pass information out of method with RETURN statement ------------------------------------------------------- */ public static double Square( double x ) { double out; // out contains some info. inside method out = x * x; return(out); // Info. in out is returned (passed outside) } public static void main( String[] args ) { double a, b; a = 4.0; b = Square( a ); // The return value is saved in b System.out.println( b) ; } }