Preview:
class firstClass {
    void method1(int a) {
        System.out.println("1");
    }
}

class secondClass extends firstClass{

    public static void main(String[] args) {
        secondClass sc= new secondClass();
        sc.method1(45);
    }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter