import java.util.*;
import java.lang.*;
import java.io.*;

//============== Overriding Vs Hiding =================
// https://[Log in to view URL]
class Foo {
    public static void classMethod() {
        System.out.println("classMethod() in Foo");
    }
 
    public void instanceMethod() {
        System.out.println("instanceMethod() in Foo");
    }
}
 
class Bar extends Foo {
    public static void classMethod() {
        System.out.println("classMethod() in Bar");
    }
 
    public void instanceMethod() {
        System.out.println("instanceMethod() in Bar");
    }
}

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        Foo f = new Bar();
        f.instanceMethod();
        f.classMethod();        
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: