Sunday, December 06, 2015

Calling non-static method from static method in Java

You might find it useful to call non-static methods from a main method in Java. You can easily do this by creating a class instance and calling the non-static method using that instance in your static method. Sounds complicated? Checkout the example:

Post a Comment