interface Compute
{
public void mult(int x,int y);
}
class A
{
void method1(Compute c,int i,int j)
{
c.mult(i,j);
}
void method2()
{
method1(new Compute()
{
public void mult (int x, int y)
{
System.out.println(x+"yu"+y+"dechengjishi"+(x*y));
}
}
,100,30);
}
}
public class Unname2
{
public static void main(String args[])
{
A a=new A();
a.method2();
}
}
public class Unname2
最新推荐文章于 2023-02-16 14:38:37 发布