java

    xiaoxiao2021-04-14  39

    assign memory:

    int p[];//only few default exit:int byte long....

    p = new int[6];

    //or

    cat tt, pp;

    int a, b;

    tt=new cat();

    pp=tt;//point to same area

    a=b;//different area

    main:

    public class Main { public static void main(string[] args) { System.out.println("hello Java!"); } }

    include:

    <main>

    import com.example.cat

    <./com/example/cat.java>

    package com.example

    static:

    var: counting the class

    func: <classname>.<func> could call

    多态:

    条件:子父类,重写,方法,父类引用指向子类实际对象

    非多态:重载,相同属性,由引用类型确定

    转载请注明原文地址: https://ju.6miu.com/read-669799.html

    最新回复(0)