I can access methods from anothr class without creatig objects in java code example
Example: call method of another class without creating instance in java android
((BaseActivity) activity).showCart();
//class name context method name
((BaseActivity) activity).showCart();
//class name context method name