about 8 years ago
Overloading Method:
Overloading Method can be easily defined by having multiple methods with same name but with different parameter, in a Class. Difference in Parameter can be in number of parameters used in method or change in type of parameter.
For Example:
class Area{ void area(int length,int breadth) { System.out.println(length*breadth); } void area(double radius) { System.out.println(3.14*radius*radius); } }
But How to overload main():
class Demo { public static void main(int a) { System.out.println(a); } public static void main(String args[]) { System.out.println("Overloading main() method"); main(50); } }
Output we Obtain is :
Overloading main() method 50
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)