what is operator overloading in java
perator overloading is the ability to redefine the functionality of the operators. Programming languages like c++ supports operator overloading
what is operator overloading in java
perator overloading is the ability to redefine the functionality of the operators. Programming languages like c++ supports operator overloading
exp on mathed overlading in java
class DisplayOverloading2
{
public void disp(char c)
{
System.out.println(c);
}
public void disp(int c)
{
System.out.println(c );
}
}
class Sample2
{
public static void main(String args[])
{
DisplayOverloading2 obj = new DisplayOverloading2();
obj.disp('a');
obj.disp(5);
}
}
java overload
int MyMethod(int x)
float MyMethod(float x)
double MyMethod(double x, double y)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us