import javax.swing.*;
  class ff1 implements if_x
  {public double func(double x)
  {return x*x-1.0;}
  }
public class inter_fx_Ex1{
public static void main(String args[])
{ ff1 ff=new ff1();
 double x=1.0;
 String s="x ="+x+"\n function f = "+ff.func(x);
 s+="x ="+x+"\n derivative df/dx = "+ff.dfunc(x);
 double a=0;double b=1.0;
 s+="\n a="+a+"b="+b+" integral of f="+ff.integral(a,b);
 String s1=" indirect referencing and interface example with inner class lambda definition:";
 JOptionPane.showMessageDialog(null,s,s1,JOptionPane.PLAIN_MESSAGE);
}}
