import java.util.*;
// Class definition
public class methods
{
// Scanner class for read user input.
static Scanner kb = new Scanner(System.in);
// main method. This is where it all starts.
public static void main(String[] args)
{
// Declaraions - variables
double x, y, square;
// Output statements in the form of method calls to println.
System.out.println("\nThis program uses pow to demonstrate");
System.out.println("static methods. It will also find");
System.out.println("the min and max of the two values");
System.out.println("you have entered.\n");
// prompt the user and read their input
System.out.print("Enter a value for x: ");
x = kb.nextDouble();
// Do it again.
System.out.print("Enter a value for y: ");
y = kb.nextDouble();
// Display some results
System.out.println("The value of x raised to the y is " + Math.pow(x,y));
System.out.println("The min value is " + Math.min(x,y));
System.out.println("The max value is " + Math.max(x,y));
} // end of the main method
} // end of the class definition
Example code: DOes something
Yeah!