call function without object 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