Advertisement
shimulxx

Untitled

Jun 19th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. import javafx.util.Pair;
  2.  
  3. import java.util.HashMap;
  4. interface Robi{
  5.     void show();
  6. }
  7. abstract class Amber{
  8.     void show(){
  9.         System.out.println("hello");
  10.     }
  11. }
  12.  
  13. public class myself  {
  14.     public static void main(String[] args) {
  15.        Amber amber = new Amber() {
  16.            @Override
  17.            public void show() {
  18.                super.show();
  19.            }
  20.        };
  21.         Robi robi = new Robi() {
  22.             @Override
  23.             public void show() {
  24.                 System.out.println("fsdsfd");
  25.             }
  26.         };
  27.        amber.show();
  28.        robi.show();
  29.     }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement