ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
can any one tell me when do u go for inheritance and 
polymorphism
 Question Submitted By :: Swetha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: can any one tell me when do u go for inheritance and polymorphism
Answer
# 1
Inheritance:Your are in a situation where you have to the
properties of a whole class repeatedly then you can go for
inheritance.
Note:Final class can't be inherited.

Polymorphism:When you are in a situation where you need to
use a method repeatedly then you can go for polymorphism.
Eg:
  consider this method
    add(int i,int j) and add(String s1,String s2)
the former will add two integers and later will concatenate
two strings but both using the same method name.
 
Is This Answer Correct ?    1 Yes 0 No
Krish
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Hi friends, i am new to java. can you explain how java is secured.  1
what is sendredirect? TCS3
Inorder to specify a container?s layout, which method is used?  1
can we add two numbers without using arthematic operators? if possible how?  2
What is Servlet?  8
What are the two ways you can synchronize a block of code? Ericsson3
Howmany number of objects we can store in an ArrayList. Is there any limit? TCS5
How to synchonise HashMap IBM3
I want to know the host name and provider name for tcs web mail TCS3
whats is the use of final,in which situation final can be used in the application? DNS2
What is unicode?  2
For which statements we use a label? Wipro3
What are the names of interfaces that doesn't consists of method/s ?  3
How are this() and super() used with constructors?  4
What is thread? BMC5
What is file class and what is its purpose?  1
Difference between Choice and a List?  1
What is difference between Eclips and MyEclips?  2
What method is used to compare two strings ?  4
What is the use of an interface?  3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com