java,
分享于 点击 18632 次 点评:81
java,
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
多态:
条件:子父类,重写,方法,父类引用指向子类实际对象
非多态:重载,相同属性,由引用类型确定
相关文章
- 暂无相关文章
用户点评