7月26日学习日志

1.今天学习了方法的调用。

有:

(1)调用非静态方法。

(2)调用静态方法。

(3)方法与方法之间的调用。

调用非静态方法是通过对象来调用的,如:

public class InvokeMethod{
    public static void main(String[] args){
        InvokeMethod in=new InvokeMethod();
        in.t1();
    }
    public void t1(){
        System.out.println("t1");
    }
}

调用静态方法是通过类名来调用。

2.对包的概念有点陌生,不太理解。

3.明天计划学习方法参数。

猜你喜欢

转载自www.cnblogs.com/20193925zxt/p/13381501.html