You can have one single object inside main and add will be called using that which in turn difference . Note: You can also make add and difference as static so you do not need any object at all.
Can two objects have same class name?
You can have one single object inside main and add will be called using that which in turn difference . Note: You can also make add and difference as static so you do not need any object at all.