Back to Browse

METHOD OVERLOADING | JAVA @YashikaRatre-ni6qn

12 views
Apr 23, 2026
1:55

class A{ //METHOD OVERLOAD void add() { int a=10,b=20,c; c=a+b; System.out.println(c); } void add(int x, int y) { int c; c=x+y; System.out.println(c); } void add(int x, double y) { double c; c=x+y; System.out.println(c); } public static void main(String [] args) { A r= new A(); r.add(); r.add(50,45.332); r.add(10,50); } }

Download

1 formats

Video Formats

360pmp42.1 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

METHOD OVERLOADING | JAVA @YashikaRatre-ni6qn | NatokHD