import java.util.Enumeration;
import java.util.Properties;
public class APITestTwo {
public static void main(String[] args) {
long startTime=System.currentTimeMillis();
Properties properties=System.getProperties();
@SuppressWarnings("rawtypes")
Enumeration propertiesName=properties.propertyNames();
while(propertiesName.hasMoreElements()){
String key=(String)propertiesName.nextElement();
String value=System.getProperty(key);
System.out.println(key+">--"+value);
}
long stopTime=System.currentTimeMillis();
System.out.println("运行时间为:"+(stopTime-startTime)+"毫秒");
String[] fromoArrary={"Hello","my","baby","come","on"};
String[] toArrary={"Why","you","do","not","love","me","?"};
System.arraycopy(fromoArrary, 2, toArrary, 3, 2);
for(int i=0;i<toArrary.length;i++){
if(i!=toArrary.length-1){
System.out.print(toArrary[i]+",");
}
else{
System.out.print(toArrary[i]);
}
}
}
}
javaAPI(3)之System类简易
最新推荐文章于 2024-02-24 18:47:37 发布