⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subclass.java

📁 Checkstyle 可寻找:·不能使用的或者多余的输入 ·空格更好的地方不使用跳格符
💻 JAVA
字号:
package com.puppycrawl.tools.checkstyle.bcel.checks;

public class SubClass extends SuperClass
{
    protected int reusedName;
    private int subClassPrivate;
    protected int superClassPrivate;
    protected int differentType;
    public static String S="S";
    public static int staticMethod() {
        return 1;
    }
    public int nonStaticMethod() {
        return 1;
    }
    public static int staticMethodSameParamName(int i) {
        return 1;
    }
    public static int staticMethodSameParamType(int x) {
        return 1;
    }
    public static int staticMethodDifferentParamNum(int i) {
        return 1;
    }
    public static int staticMethodDifferentParamType(String i) {
        return 1;
    }
    public static int staticMethodDifferentObjectType(String i) {
        return 1;
    }
    public static int staticMethodSuperParamType(String i) {
        return 1;
    }
    public void callStaticMethodWithObject() {
        SubClass s = new SubClass();
        s.staticMethod();
    }
    public void callStaticMethodWithClass() {
        SubClass.staticMethod();
    }
    public void callStaticMethodWithThis() {
        this.staticMethod();
    }
    public String callStaticFieldWithObject() {
        SubClass s = new SubClass();
        return s.S;
    }
    public String callStaticFieldWithClass() {
        return SubClass.S;
    }
    public String callStaticFieldWithThis() {
        return this.S;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -