00072_System类
1、概念
(1)System中代表程序所在系统,提供了对应的一些系统属性信息,和系统操作;
(2)System类不能手动创建对象,因为构造方法被private修饰,阻止外界创建对象;
(3)System类中的都是static方法,类名访问即可。
2、常用方法
(1)currentTimeMillis() 获取当前系统时间与1970年01月01日00:00点之间的毫秒差值;
(2)exit(int status) 用来结束正在运行的Java程序。参数传入一个数字即可。通常传入0记为正常状态,其他为异常状态;
(3)gc() 用来运行JVM中的垃圾回收器,完成内存中垃圾的清除;
(4)getProperty(String key) 用来获取指定键(字符串名称)中所记录的系统属性信息;
(5)arraycopy方法,用来实现将源数组部分元素复制到目标数组的指定位置。
Normal
0
7.8 磅
0
2
false
false
false
EN-US
ZH-CN
X-NONE
MicrosoftInternetExplorer4
System类不能手动创建对象,因为构造方法被private修饰,阻止外界创建对象
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
最新文章
- OpenCascade Primitives BRep-Cylinder
- SQL Server 2012 批量重建索引
- O2O模式成功案例分享 汲取精华化为己用
- spring websocket Converters must not be empty
- js判断用户进入设备代码
- 转:FIFO和DMA
- gosslary
- Ubuntu14.04: Error found when loading /root/.profile
- module、export、require、import的使用
- 怎么为WebStorm更换主题 修改字体样式
- eclipse代码编辑区字符串自动转义设置
- 开发时候常用的js方法封装
- 一份.NET 容器化的调查小结
- kubernetes进阶之五:Replication Controller&;Replica Sets&;Deployments
- windows下Go升级及GoLand的安装激活
- Breakable loop in Scratch
- [HTML/CSS]有一种节点叫做文本节点
- ABAP 内表(internal table) 标题行(header line) 工作区(work area) 简介 - [SAP]
- LOD,听起来很牛逼的样子
- 撩课-Web架构师养成系列第一篇