|
String version executed.
First think about default values. In both overloaded methods, you are referencing objects(s also an object of String class, not like primitives.) Default values not referring any objects.
So, think about class hierarchy. Object class is the root/main of the class hierarchy. That means every class has Object as superclass. String class also extended Object. That's why you got the above result I mentioned.
Try to remove that overloaded method, second method with argument type String. You get the result as, Object version executed
Hope it's help to you.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|