import javax.swing.*;
class ff2 implements if_xj
{public double func(double x[])
 {return x[0]*x[0]+x[1]*x[1];}
}
public class ifxj_Ex1 {
public static void main(String args[])
{ 
 ff2 ff=new ff2();
 double x[]={1.0,2.0};
 String s="x ="+x+"\n derivative df/dx = "+ff.dfunc(x,1);
 String s1=" indirect referencing and interface example with inner class lambda definition:";
 JOptionPane.showMessageDialog(null,s,s1,JOptionPane.PLAIN_MESSAGE);
}}
