知识点

递归阶乘例子:

public static long getGactorial(int n){
if(n==1){//递归收敛条件
return 1;
}
return getGactorial(n-1)*n;
}

 死递归:

public static long getGactorial(int n){


return getGactorial(n-1)*n;
}

递归收敛条件:if(n==1){

        return 1;  

        }

阶乘公式:(n-1)*n

数组分为:静态初始化:int[] a={10,20,30};

     动态初始化:int[] b=new int[3];

           

public static void main(String[] args) {
/**byte[] b = { 1, 2, 3 };
byte[] a = b;//把b的值赋值给a(也就是说a和b的地址值是一样的)
a[0] = 10;
System.out.println(b[0]);
System.out.println("************");
byte c = 50;
byte d = c;//值是50
d = 60;
System.out.println(c);
*/
byte[] b={1,2,3};//静态初始化
byte[] a=b;//相同的地址值,就是说和上面的数组一样
a[0]=10;//重新赋的值
System.out.println(b[0]);
}下图即是:

属性后面无括号(变量.属性)

基本数据类型和数组默认都是0,赋值

基本数据类型:存值; 例如:int age=10;(存的是10)

引用类型:存放地址值(别的)例如:int[] age=new int[10];(存的是地址)

栈:后进先出

压栈:进

弹栈:出

方法区:类、接口

参数:形参(布尔、字符串)、实参(具体数字)

重载:方法名相同,参数不同--->>>>例如:System.out.println(参数);

                   System.out.println(引用类型);

                    System.out:标准输出流(类)

                    println:方法名相同,参数不同,好处:方法调用参数不同的差异

返回值:return在单个if条件中返回值不成立

  if(条件){

    return a;

    }else{

    return b;

     }

递归:方法调用方法

200:正常响应成功

302:重定向

304:读缓存

404:用户操作资源不存在

505:服务器内存异常

原文地址:https://www.cnblogs.com/Koma-vv/p/9330947.html