Professional Documents
Culture Documents
===========
every java project developement approches's depend' on overloading(add on) &
override(replace)..
syn)
====
same name with different signture(parameter)
note:
===
these overloading concept mainting by single class...
=====================================
ex:
===
class Developement
{
private int a,b; // req
}
public void logic(int...x) // addon to same logic(overloadin)
{
int sum=0;
for(int a:x)
{
sum=sum+a;
}
System.out.println(" ur updated add res are :"+sum);
}
class OverloadingClient
{
public static void main(String []args)
{
d.logic(5);
d.logic(435,456,4575,67567); //int...x=> int x[435,456,4575,67567];
d.logic(435,456,4575,67567,45345);
d.logic(435,34,5,345,34,5,345,34,5,34,53,45,34,5,3456,45,645,6,45,645,6,45,645,6,54
,645,6,45,6,45,6,456,54,6,45,645,6,45,6,546,45,6,456);
}
}
/*
Developer obj:
==========
=> if updation are completely differnt from project client, then i go for methods
overloading only... but abit of different functionalaties are same, then these
case methods overloading not ok..
to solve the above points, from JDK1.5 onwords we have new concept called
"VAR-ARGS"..
=> here ...variable internally acting like " single size of compiler time array's
syntax's"
============================
*/