import javax.swing.*; // program uses class Scanner

public class ex14
{
int  i=6; //class variable

public static void write(String s)
{ JOptionPane.showMessageDialog(null,s,
"Dynamic method and object declaration",JOptionPane.PLAIN_MESSAGE);	
}

public double y(double x)
{return x*x*i;}

public String s1(int j,double x)
{ i=j;
  String s="i="+i+" y = "+y(x)+"\n";
  return s;
}	 

}
