0

What exactly is data overriding?

How to use it in a Java program and what is it's function ?

10th Dec 2016, 3:19 PM
Anand Chourasiya
Anand Chourasiya - avatar
1 Answer
+ 1
Overriding in programming usually means overriding a function. What does it mean? It means that you can make function with the same name, but different arguments. For example: public String sayMyName() { return "My name is Joe" ; } public String sayMyName(String name) { return "My name is" + name; } You can override constructors and normal methods.
10th Dec 2016, 5:05 PM
PrzemysƂaw