java - Getting the Object Calling a Method -


in java, how can object calling method, within method calling, if method in class? have looked on internet , no solution. please help?

the way can think of pass this method,

static void somemethod(object o) {   system.out.println(o); } void testit() {   somemethod(this); // <-- pass current instance method. } 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -