Java Undefined Object

By “undefined object as a parameter”, I assume you mean that you’re looking to write a function that doesn’t specify the type of the object in the function declaration, allowing you to only have one function. This can be done with generics. Instead of: static void func(String str) { System.out.println(“The string is: “+str); } static … Read more