2018年9月1日

[JAVA]数组

摘要: JAVA数组不同于C/C++数组,JAVA允许在编写时不确定数组里需要多少个元素。 可以直接用new在数组里创建基本数据类型组(new不可以创建单个的基本数据类型) 运行结果: array lenth:4[0, 0, 0, 0] 运行结果: array lenth:8[0, 0, 0, 0, 0, 阅读全文

posted @ 2018-09-01 21:14 郑晓龙 阅读(116) 评论(0) 推荐(0)

[JAVA]基本数据类型

摘要: JAVA的基本数据类型有: byte char boolean short int long float double 其他的比如:String,Integer都不是基本数据类型哦,他们是包装类 阅读全文

posted @ 2018-09-01 21:00 郑晓龙 阅读(95) 评论(0) 推荐(0)

[JAVA]生成随机数

摘要: public class GetRandomInit { public static void main(String[] args) { // TODO Auto-generated method stub Random random = new Random();//默认以当前时间为随机数种子 for(int i=0;i<5;++i... 阅读全文

posted @ 2018-09-01 18:40 郑晓龙 阅读(93) 评论(0) 推荐(0)

导航