Created
August 12, 2017 11:50
-
-
Save the-cybersapien/c7ddbb4bda6383cac21c708e5a884b25 to your computer and use it in GitHub Desktop.
Java Class Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Calculate { | |
abstract int add(int a, int b); | |
} | |
public class Main{ | |
public static void main(String[] args){ | |
int result = new Calculate(){ | |
@Override | |
int add(int a, int b){ | |
return a+b; | |
} | |
}.add(11010, 22011); | |
System.out.println(result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment