   Java: showInputDialog and showMessageDialog?
  I'm writing a program that calculates the volume and area of sphere, but I get errors when I'm trying to use showMessageDialog and showInputDialog, why?import javax.swing.JOptionPane.*;public class Main {    public static void main(String[] arg) {   String s = showInputDialog(null, "What is the radius of the sphere?");   double radius = Double.parseDouble(s);   double volume = (4*3.14*radius*radius*radius)/3;   double area = 4*3.14*radius*radius;   showMessageDialog(null, "The volume is " + volume + " and the area is " + area);    }}Error:Main.java:5: cannot find symbolsymbol  : method showInputDialog(<nulltype>,java.lang.String)location: class Main   String s = showInputDialog(null, "What is the radius of the sphere?");Main.java:9: cannot find symbolsymbol  : method showMessageDialog(<nulltype>,java.lang.String)location: class Main   showMessageDialog(null, "The volume is " + volume + " and the area is " + area);2 errorsBUILD FAILED (total time: 0 seconds)
  I believe those methods are static methods in JOptionPane.Try JOptionPane.showInputDialog() and JOptionPane.showMessageDialog()   ;Quote:Original post by Anonymous PosterI believe those methods are static methods in JOptionPane.Try JOptionPane.showInputDialog() and JOptionPane.showMessageDialog()The word static woke me up. I should've written import static javax.swing.JOptionPane.*; ^^   