what is difference between method overloading & method
overridding with example?
Answer Posted / rana.ankur
overloading:
class A
{
Num(int a)
{
System.out.println("a: " + a);
}
Num(int a,int b)//overloading
{
System.out.println("a and b: " + a + " " + b);
}
CLass Overloading
{
public satic void main(Stinr ar[])
}
A a=new A()
a.Num(12);
a.Num(12,12);
}
}//thanks
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why java applets are more useful for intranets as compared to internet?
Which language is java?
What is the difference between assignment and initialization?
Explain super keyword in java.
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
What is collection api?
What is primitive data type in java?
how can you take care of mutual exclusion using java threads? : Java thread
what is thread? What are the high-level thread states? : Java thread
Explain about data types?
What is the difference between serial and throughput garbage collector?
What are voids?
Do I need to import java.lang package any time? Why?
What is the difference between stream and buffer?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.