Is it possible to do method overloading and overriding at a
time
Answer Posted / sathishkumar.m
class A
{
int c;
void add()
{
System.out.println("hai");
}
void add(int b)
{
c=b;
System.out.println("value of b:"+c);
}
}
class B
{
int e;
void add(int d)
{
System.out.println("value of d:"+e);
}
}
class Demo
{
public static void main(String aa[])
{
A o1=new B();
o1.add();
}
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
What is the use of http-tunneling in rmi?
Where is the find and replace?
What is private public protected in java?
What is return null in java?
What is the use of runnable interface?
What are the skills required for core java?
Can I learn java in 3 months?
What are triggers in DB? Explain their types. How do they work?
what is bmg file and how to create that files?what will it contailn?
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain
What does it mean to flush a file?
what is heap memory?
Why we override equals() method?
What is == mean?