Java
Pages
Home
Java
Interview
Tuesday 17 January 2017
Can we overload methods that differ only by static keyword?
We
canno
t overload two methods in Java if they differ only by static keyword (number of parameters and types of parameters is same).
Output:
Compiler Error
, cannot redefine foo().
1 comment:
Unknown
1 September 2021 at 06:19
y
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
y
ReplyDelete