12345678910111213141516171819 |
- package com.sf.day08.staticmethod;
- public class Student extends Person {
- /**
- * 不是重写la 它就是一个普通方法 Student
- */
- public static void m1(){
- System.out.println("Person.m1");
- }
- //先重写非静态方法
- @Override
- public void m3() {
- System.out.println("这是方法3 -- 非静态的");
- }
- }
|