0% found this document useful (0 votes)
28 views1 page

Method Overloading: Public Void Print (String STR) (... ) Public Void Print (Date Date) (... )

Method overloading allows two methods to share the same name but have different parameters. For example, a print method could take a String parameter in one method and a Date parameter in another method, even though they share the name print. This allows methods to perform similar tasks but accept different data types.

Uploaded by

Gautam Sai Teza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

Method Overloading: Public Void Print (String STR) (... ) Public Void Print (Date Date) (... )

Method overloading allows two methods to share the same name but have different parameters. For example, a print method could take a String parameter in one method and a Date parameter in another method, even though they share the name print. This allows methods to perform similar tasks but accept different data types.

Uploaded by

Gautam Sai Teza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Page 1 of 1

Method Overloading
Method overloading is when two methods share the same name but have a different number or type of
parameters.
eg,
public void print(String str) {
...
}
public void print(Date date) {
...
}

You might also like