一个类创建的名字不同于类的方法,在同一个包下执行的另一个类怎么调用这个方法?
package class02;
public class Telephone {
public void Telephone1(float a1,float b1,float c1) {
float a;
float b;
float c;
a=a1;
b=b1;
c=c1;
System.out.print(a);
System.out.print(b);
System.out.print(c);
}
}
package class02;
import class02.Telephone;
public class PHONE {
public static void main(String[] args) {
// TODO Auto-generated method stub
Telephone1 phone2=new Telephone1(1.0f,2.0f,3.0f);
}
}