I have a method: public static void methodName( long x , int y ) If I want to use this method but some of my y's are longs, can i do this in those cases: methodName( sampleInteger , ( int )( sampleLong ) ); I got a compile error but I'm wondering if there is another way to do this. If ...

I have a method that is working fine. But the handling of return values from method.invoke() seems kinda funky. The method.invoke() call is in a loop that processes a bunch of files, the names of which are provided by the cmm.filename variable. All of the file handling functions return boolean (whether processing was successful or not). So, As you can see ...

Method signatures are selected at compile time, not run time. Since the variable is declared as Object, that's what's used to bind the call to a method, at compile time it's not known that the actual object will be of class Artist. Run time binding, while theoretically possible, would be unacceptably slow (requiring a search of the methods list for every ...