0
What exactly is data overriding?
How to use it in a Java program and what is it's function ?
1 Odpowiedź
+ 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.