here is the output
here is the code
I have implemented two methods in the class with same name and same paremeters .One by using static keyword and another one is instance method.If I execute the class by using the reference or by using static method calling apporach it executes the code.According to java,it shows error that duplicate method add() is found.but vs code and eclipse IDE gives the output.
New contributor
muttaluri vivekananda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.