explain about method overloading and method overriding with
difficult examples
Answer Posted / mayank sharma
Clas A
{
Virtual void hi(int a)
{
}
}
Class B:A
{
public overrid void hi(int a)
{
}
}
Overloading simply involves having a method with the same
name within the class.
Example for Over loading
Class A
{
class a()
{
}
class a(int a)
{
}
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is a top level class in java?
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
What restrictions are placed on method overriding in java programming?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
What are parsing rules?
What is the purpose of declaring a variable as final?
What are aggregate functions explain with examples?
How does singleton class work?
Is java owned by oracle?
Can interface be private in java?
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
Differentiate between array list and vector in java.
State the difference between strings and arrays.
What is the private method modifier?
What are 3 data types?