package com.itbaizhan.test;
public class Car {
public void run (){
System.out.println("Car.run");
}
}
package com.itbaizhan.test2;
public class Car {
public void stop(){
System.out.println("Car.stop");
}
}
package com.itbaizhan.test3;
import java.util.Date;
import com.itbaizhan.test.Car;
public class tMain {
public static void main(String[] args) {
com.itbaizhan.test2.Car car=new com.itbaizhan.test2.Car();
car.stop();
String str1="aaa";
java.lang.String str2="bbb";
System.out.println(str2);
Date da=new Date();
System.out.println(da);
Car car0=new Car();
car0.run();
}
}
package com.itbaizhan.test3;
public class tMain2 {
public static void main(String[] args) {
Math.random();// public static double random() {
//类名调方法,random是一个静态方法
System.out.println(Math.random());
}
}
package com.itbaizhan.test3;
import static java.lang.Math.random;
public class tMain3 {
public static void main(String[] args) {
random();
System.out.println(random());
}
}
package
最新推荐文章于 2024-07-24 17:27:32 发布