按要求編寫Java應用程序?
package pack1;public class A {private int i;float f;public double d;}package pack1;public class B {public static void main(String args[]){A a=new A();a.f=2;a.d=3;}}package pack2;public class B {public void f(){System.out.println("執行pack2包中的類B的方法f");}}package pack2;import pack1.A;public class C {public static void main(String args[]){A a=new A();B b=new B();b.f();a.d=3;}
}