|Home |Login |Registration |Struts Step by Step Tutorial |Hibernate Step by Step Tutorial |Spring Step by Step Tutorial |JSP Step by Step Tutorial |JDBC Step by Step Tutorial |Web Services Step by Step Tutorial |EJB fundamentals | ORACLE Step by Step Tutorial | SCJP 5.0 and SCJP 6.0 Study Guide | SCWCD 5.0 Study Guide | SCJP Tips
Java mock test | SCJP mock test | SCJP DUMP | SCBCD mock test | SCWCD mock test | JSP mock test | ORACLE mock test | OCP mock test | Hibernate mock test | Servlet mock test | Struts mock test | EJB mock test | C mock test | C++ mock test | Aptitude mock test | PMP mock test Exam |Java online test exam | JSP online test exam | ORACLE online test exam | Hibernate online test exam | Servlet online test exam | Struts online test exam | EJB online test exam | C online test exam | C++ online test exam | Aptitude online test exam

Download java,jsp,servlet,hibernate,spring,jdbc,jms,struts,EJB,oracle,c,c++,informatica interview questions and answers in pdf format


Download 1600 PMP Questions Free


Download 800 SCJP Questions Free


Download 600 SCWCD Questions Free

Ads

Free ERP Customization

                                                                                                                                                    
Add/View Reviews , Comments

OOPs and Design Pattern interview questions

  • "is-a" relationship describes inheritance relationship between objects view answer
  • has-a relationship, which is also called object composition view answer
  • The four main concepts are involved in OOP view answer
  • Example Java Code For Association & Aggregation & Composition view answer
  • What are the common things need to consider while Creating and Destroying Objects view answer
  • what is the difference between encapsulation and data hiding? explain with Code example? view answer
  • Dependency In Java view answer
  • Is Singleton class is serialized ? view answer
  • What is Singleton ? view answer
  • What is Observer pattern ? Explain with Code Example ? view answer
  • What is Factory Method pattern? view answer
  • What is Adapter pattern ? view answer
  • What is Proxy and Decorator patterns ? With Java Example ? view answer
  • Brief Introduction to OOP Concepts view answer
  • What is Abstract Factory Pattern ? With Code Example ? view answer

!!! OOPs and Design Pattern interview questions !!!

"is-a" relationship describes inheritance relationship between objects



"is-a" relationship describes inheritance relationship between objects. If you can talk something with word "is". They can be described with keyword extends in coding. "is-a" relationship is also called classification.

public class Pepperoni extends Pizza {//is-a relationship
private int size;//has a relationship
private String style;

public int getSize() {
return size;
}
public void setSize(int sz) {
this.size = sz;
}

public String getStyle() {
return style;
}
public void setStyle(String style) {
this.style = style;
}
}



Note that is-a relationship described with Java code by using extends keyword

The information you are posting should be related to java and ORACLE technology. Not political. Your Ad Here