Skip to content

Instantly share code, notes, and snippets.

@dionyziz
Created April 15, 2021 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dionyziz/5d13a42a3a49f041f91f278c5fccf60b to your computer and use it in GitHub Desktop.
Save dionyziz/5d13a42a3a49f041f91f278c5fccf60b to your computer and use it in GitHub Desktop.
import java.io.*;
import java.util.*;
public class Solution {
public static class A {
}
public static class B extends A {
}
public static void mymethod(A a) {
System.out.println("Hello world!\n");
}
public static void main(String[] argv) {
B b = new B();
Solution.mymethod(b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment