Possible Duplicate:
Is there a ‘new’ modifier for methods in Java?
In c#, a subclass’s method can be modified as new.
One usage of the new modifier to explicitly hide a member inherited from a base class.
Is there a same keyword in Java?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No.
In C# you use new to hide / shadow non-virtual functions of a base class. You need this keyword in C#, because you can not override functions that are non-virtual.
In Java, all functions are virtual by default, hence you can always override them and there is no need for a keyword such as new.
Hope this helps.