We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adb2d10 commit 54d41b8Copy full SHA for 54d41b8
1 file changed
OOPs/Overloading.java
@@ -0,0 +1,22 @@
1
+
2
+class Bike extends Vehicle{
3
4
+/**
5
+* Example of method Overloading
6
+* Method name must be same
7
+*/
8
9
+ void start(int x, int y){
10
+ System.out.println("method 1");
11
+ }
12
13
+ void start(int x){
14
+ System.out.println("method 2");
15
16
17
+ public static void main(String args[]){
18
+ Bike b = new Bike();
19
+ b.start(1);
20
+ b.start(1,2);
21
22
+}
0 commit comments