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
Explain about interthread communication and how it takes place in java?
What are different types of arrays?
What is preparedstatement in java?
What is default switch case? Give example.
v-model life cycle
What is the difference between ArrayList and Vector? which one is better in Java
Can an unreferenced object be referenced again?
Why bytecode is called bytecode?
Which programming language is most secure?
What is the purpose of declaring a variable as final?
What is finally in Java?
How are variables stored?
what is daemon thread and which method is used to create the daemon thread? : Java thread
What is the similarity between dynamic binding and linking?
Is binary a low level language?