import javax.swing.*;
public class ifxj_Ex4 extends Mathd{
public static String array(double x[])
{   String s="";
	for(int i=0;i<x.length;i++) {s+=x[i]+" ";}
	return s;
}
public static void main(String args[])
{ //Function definition
 if_xj ff=(x,y)->{J(0,x[0])*x[0]*x[0]+x[1]*x[1]};
 double x[]={1.0,2.0};
  String s="x ="+array(x)+"\n function f f = "+ff.func(x);
  s+="\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);
}}
