Java - calling a void function without semicolons (;) -
I want to call the function without using semicolons, is it possible?
Ex:
minus myFunction () {}
I want to call it without using a semicolon.
If the function can write something else than zero
if (myfunction ()! = Null) {}
I How can I do something with zero function?
If you use a zero
method without using a semi-colon If you need to be called, then you can use reflection and instead
/ * 1 * / myObject.myMethod (); / * 2 * / myObject.myMethod (arg0, arg1); // myMethod (type1 arg0, type2 arg1)
You can write
// if (myObject.getClass (). GetDeclaredMethod ( "MyMethod"). Invoke myObject == faucet {}} hold (exception e) {try} 2 try {if (myObject.getClass (). GetDeclaredMethod ("myMethod", Type1.class, Type2.class) Call (MyObject, arg0, arg1) to invoke == faucet) {}} hold (exception e) {}
Comments
Post a Comment