System
来源:互联网 发布:ladder mac版怎么用 编辑:程序博客网 时间:2024/05/17 03:18
package niu.cheng4;
import java.util.Arrays;
//System
//static InputStream in “标准”输入流。
//static PrintStream out “标准”输出流。
//
//System 类包含一些有用的类字段和方法。它不能被实例化。
//public static void gc()运行垃圾回收器。
//public static void exit(int status)终止当前正在运行的 Java 虚拟机,参数用作状态码;根据惯例,非 0 的状态码表示异常终止。
//public static long currentTimeMillis()返回以毫秒为单位的当前时间
//public static void arraycopy(Object src,
// int srcPos,
// Object dest,
// int destPos,
// int length)从指定源数组中复制一个数组,复制从指定的位置开始,到目标数组的指定位置结束
//
//
public class SystemDemo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
/*
//public static void gc()运行垃圾回收器。
Son s=new Son("xxx", xx);
System.out.println(s);//Son [name=xxx, age=xx]
s=null;
System.out.println(s);//null
System.gc();//垃圾回收器运行:Son [name=xxx, age=xx]
*/
/*
//public static void exit(int status)终止当前正在运行的 Java 虚拟机参数用作状态码;根据惯例,非 0 的状态码表示异常终止。
System.exit(0);
System.out.println("-----------");//终止了
*/
/*
//public static long currentTimeMillis()返回以毫秒为单位的当前时间
long start =System.currentTimeMillis();
for(int x=0;x<10000;x++){
System.out.println("helloworld"+x);
}
long end =System.currentTimeMillis();
System.out.println("跑完这段代码用时"+(end-start)+"毫秒");//跑完这段代码用时213毫秒
*/
//public static void arraycopy(Object src,int srcPos,Object dest,int destPos,int length)从指定源数组中复制一个数组,复制从指定的位置开始,到目标数组的指定位置结束
int[] x={1,2,3,4,5,6,7};
int[]y={2,3,4,5,6};
System.arraycopy(x, 2, y,0 , 2);
System.out.println(Arrays.toString(x));//[1, 2, 3, 4, 5, 6, 7]
System.out.println(Arrays.toString(y));//[3, 4, 4, 5, 6]
}
}
import java.util.Arrays;
//System
//static InputStream in “标准”输入流。
//static PrintStream out “标准”输出流。
//
//System 类包含一些有用的类字段和方法。它不能被实例化。
//public static void gc()运行垃圾回收器。
//public static void exit(int status)终止当前正在运行的 Java 虚拟机,参数用作状态码;根据惯例,非 0 的状态码表示异常终止。
//public static long currentTimeMillis()返回以毫秒为单位的当前时间
//public static void arraycopy(Object src,
// int srcPos,
// Object dest,
// int destPos,
// int length)从指定源数组中复制一个数组,复制从指定的位置开始,到目标数组的指定位置结束
//
//
public class SystemDemo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
/*
//public static void gc()运行垃圾回收器。
Son s=new Son("xxx", xx);
System.out.println(s);//Son [name=xxx, age=xx]
s=null;
System.out.println(s);//null
System.gc();//垃圾回收器运行:Son [name=xxx, age=xx]
*/
/*
//public static void exit(int status)终止当前正在运行的 Java 虚拟机参数用作状态码;根据惯例,非 0 的状态码表示异常终止。
System.exit(0);
System.out.println("-----------");//终止了
*/
/*
//public static long currentTimeMillis()返回以毫秒为单位的当前时间
long start =System.currentTimeMillis();
for(int x=0;x<10000;x++){
System.out.println("helloworld"+x);
}
long end =System.currentTimeMillis();
System.out.println("跑完这段代码用时"+(end-start)+"毫秒");//跑完这段代码用时213毫秒
*/
//public static void arraycopy(Object src,int srcPos,Object dest,int destPos,int length)从指定源数组中复制一个数组,复制从指定的位置开始,到目标数组的指定位置结束
int[] x={1,2,3,4,5,6,7};
int[]y={2,3,4,5,6};
System.arraycopy(x, 2, y,0 , 2);
System.out.println(Arrays.toString(x));//[1, 2, 3, 4, 5, 6, 7]
System.out.println(Arrays.toString(y));//[3, 4, 4, 5, 6]
}
}
0 0
- system
- System
- system
- system
- system
- System
- System
- System
- system
- system ():
- system()
- System
- System
- System
- system()
- System
- System
- system
- Leetcode133: Unique Paths II
- Swift类型选择(Type Casting)
- 拼图小游戏”ST--拼图“开发篇之主要功能的实现(二)
- hdu5536Chip Factory 字典树与异或 2015ACM/ICPC亚洲区长春站现场赛
- C学习笔记——接触C语言
- System
- 下载文件
- 使用wagon-maven-plugin插件自动部署项目
- OC之对象传递游戏浅试
- 忍着痛苦,也要继续
- MagSearch高速云点播堪比115你有东西我便播
- 字符串的操作
- iOS Apple文档
- java并发库知识点超强总结图