-
-
Save kasramp/60397d7726d951c8792a5599e8ff3d21 to your computer and use it in GitHub Desktop.
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
MyClass mc = new MyClass(); | |
MethodNeedsObject(mc); | |
// We can change the above example to below, | |
MethodNeedsObject(new MyClass()); | |
// For defining anonymous class see the follow example, | |
MethodNeedsObject( new MyClass() { | |
public void MyMethod(int x, int y) { | |
//Do some operations; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment