优课达专有Gitlab

Update README.md
星河 authored
87ca30e2
  1. String中的首字母需要大写
  2. 输出是sout tab键
  3. Long类型赋值的时候要在数字后面加上一个小写的L
  4. 字符串使用+可以让多个字符串链接在一起例如public static void main(String[] args){String name = "章问"; System.out.println("姓名:"+name+" 年龄:"+18);}
  5. boolean isAllow = true;
  6. Math.random()方法用于返回一个随机数(浮点数),随机数范围为0.0=<Math.radom<1.0
  7. int nValue = (int) value;类型转换方法
  8. 固定的方法格式,main方法用于启动程序public static void main(String[] args)
  9. public static void 方法名称(方法参数){ } 例如:public static void myDocument(){ }第一个单词小写,后面单词的首字母大写。’
  10. 方法调用:在main程序中打出方法的名称例如:myDocunent();
  11. 2中是形参,而调用random(数字)中的数字是实参
  12. Return中断后面所有的代码
  13. 递归就是在自己的函数中用自己的函数 15.// 验证码方法public static void code(int len) // 随机数方法public static double random() 15.### boolen(布尔) boolen类型是返回true/flase
  14. // 声明一个 int 数组的变量,数组大小为6 int[] numbers = new int[6]; int size = numbers.length测长度
  15. int默认值为0,String默认值为null 1.### charAt() String message = "Hello Java"; // 取出第一个字 char str = message.charAt(0); 2.### trim() String str = " 优课达 ";// 处理一下去空格 String newStr = str.trim();(只能去除两边的空格,中间的去除不了)