esha prasad ts


{ City } bangalore
< Country > india
* Profession * sse
User No # 28206
Total Questions Posted # 3
Total Answers Posted # 2

Total Answers Posted for My Questions # 28
Total Views for My Questions # 50684

Users Marked my Answers as Correct # 27
Users Marked my Answers as Wrong # 4
Questions / { esha prasad ts }
Questions Answers Category Views Company eMail

Difference between overloading and Overriding. (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>

Accenture, CTS, Extensio, IBM, iFlex, PA Consulting, Symphony, Tarang,

12 Core Java 27446

where is .equals() method and how is it different from == operation Is hashing related to these?

iFlex,

4 Core Java 6375

explain System.out.println()

CTS,

12 Core Java 16863




Answers / { esha prasad ts }

Question { IBM, 11626 }

explain method overridding method overloding with examples?


Answer

Overriding:: It's not any two classes will do to study this
scnario, because overriding will come in a scenario
involving parent child relationship.



public class Parent{

public void sum(int a, int b)
{
System.out.println(a+b);
}
class Child extends Parent
{


public void sum(int a, int b)
{
System.out.println("Sum of the integers = "+a+b);
}
}

}

class MainClass
{
public static void main(String[] args) {


}

}

Is This Answer Correct ?    8 Yes 0 No

Question { Tesco, 30789 }

A father age is 30 years older than his son and he has
thrice of his son age after 5 years.Find father's age?


Answer

Father=Son+30 or Son= Father-30

Father+5 = 3(Son+5)

Father+5 = 3(Father-30+5) /* < as Son= Father-30>*/
Father+5 = 3Father-75

Father=3Father-80
0=2Father-80

Father=40

Is This Answer Correct ?    19 Yes 4 No