package com.oop.demo01; public abstract class Demo02 { //静态方法 static public static void main(String[] args) {//在main方法里面写( //静态方法 Student.say(); } //非静态方法 static //实例化这个类 new //对象类型 对象名 = 对象的值 // Student student= new Student(); // Student.say1(); }
【面向对象】 方法的回顾
最新推荐文章于 2024-06-16 17:40:45 发布