上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: [值类型] 也就是基本数据类型 基本数据类型常被称为四类八种 四类: 1.整型 2.浮点型 3.字符型 4.逻辑型 八种: 1.整型4种 byte 1字节 -128——127 short 2 字节 -32,768 —— 32,767 int 4 字节 -2,147,483,648 ——2,147,4 阅读全文
posted @ 2016-05-13 21:40 凌零聆 阅读(147) 评论(0) 推荐(0) 编辑
摘要: package lianxi; import java.util.*; public class kaishihejiewei { public static void main(String[] args) { System.out.print("请输入字符:"); Scanner str = new Scanner(System.in); ... 阅读全文
posted @ 2016-05-13 21:12 凌零聆 阅读(521) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Erfen { public static void main(String[] args) { int ary[] = new int[10]; Random a = new Random(); for (int i = 0; i ary[j + 1]) { ... 阅读全文
posted @ 2016-05-13 15:14 凌零聆 阅读(147) 评论(0) 推荐(0) 编辑
摘要: package lianxi; import java.util.*; public class Yanzhengma { public static void main(String[] args) { String str="abcdefghijklmnopqrstuvwxyzABCDEFGHI 阅读全文
posted @ 2016-05-12 21:04 凌零聆 阅读(115) 评论(0) 推荐(0) 编辑
摘要: package lianxi; import java.util.*; public class Suijishu { public static void main(String[] args) { int ary[]=new int[6]; for (int i = 0; i <6; i++) { ... 阅读全文
posted @ 2016-05-11 14:11 凌零聆 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 一.java.lang.Math.random() 在使用这一静态方法的时候,我们不需要import任何包,因为java.lang.*包是默认载入的,下面举例说面使用方法: 二.创建java.util.Random对象 阅读全文
posted @ 2016-05-10 20:57 凌零聆 阅读(308) 评论(0) 推荐(0) 编辑
摘要: package lianxi; import java.util.*; public class Erfenchazhao { // 网上查到的方法 public static int halfSearch(int a[], int x) { int mid, left, right; left = 0; right = a.length - ... 阅读全文
posted @ 2016-05-10 20:41 凌零聆 阅读(157) 评论(0) 推荐(0) 编辑
摘要: package lianxi; import java.util.*; public class Maopaopaixu { public static void main(String[] args) { //输入数字 并把数字插入数组中 Scanner shu=new Scanner(Syste 阅读全文
posted @ 2016-05-10 11:29 凌零聆 阅读(167) 评论(0) 推荐(0) 编辑
摘要: double jiecheng=1; double sum=0; int j=0; for (int i = 1; i <=20; i++) { do { j++; jiecheng=jiecheng*j; } while (j<i); // System.out.println(jiecheng) 阅读全文
posted @ 2016-05-09 13:29 凌零聆 阅读(363) 评论(0) 推荐(0) 编辑
摘要: int i=0; int jiecheng=1; do { i++; jiecheng=jiecheng*i; } while (i<5); System.out.println("5的阶乘为"+jiecheng); 阅读全文
posted @ 2016-05-09 13:27 凌零聆 阅读(367) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页