java - Multiple parameters for a single method -


i don't know how simple or if possible can't seem find information on it. method there way set multiple parameters.

for example in public void required call component , and string when call method in java file.

public void testmethod(component c, string s) {     //do } 

is there way public void testmethod(component c, string d) or public void testmethod(component c, int i) , when method called either specified?

it's called method overloading. create them separate methods , compiler (usually) infer right 1 based on input values.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -