import javax.swing.*; // program uses class Scanner
public class ex6
{
public static void main(String arg[])
{
ex5 z=new ex5();
String s="i="+z.i+" y = "+z.y(2.0)+"\n";
z.i=2;
s+="i="+z.i+" y = "+z.y(2.0);
JOptionPane.showMessageDialog(null,s,
"Dynamic method and object declaration",JOptionPane.PLAIN_MESSAGE);	
}	 
}
