Skip to main content

Java Inheritance


#Java Inheritance Interview Questions  




  #inheritance | #multilelelinheritance | #single inheritance | #javainheritance | #oppsinheritance |     #java | #OOps | #corejava | #corejavainheritance | #java inheritance | #coreinheritance |   #oopjavainheritance 


1: What is inheritance?  

A: Inheritance is the most important feature in any object-oriented programming language, This is a                child-parent relationship that allows as to reuse the same logic or same code in a specific manner.  


2: How many types of inheritance are supported by java?

A:  4 types of inheritance are supported by java,

          Single-Level, Multi-Level, Hierarchical, Multiple.

Note: In java multiple inheritance, we can achive through Interface.




                                                               Single Level inheritance



Multi-Level inheritance




Hierarchical inheritance




Comments

Post a Comment

Popular posts from this blog

Java Collection Framework Most Important Questions

  Java Collection Framework Most Important Questions   Q:-1   What is Collection Framework ? A:-     Collection framework is a unified architecture or predefined java classes and interfaces that is used for implementing  a group          of objects in java. Q:-2   What is Collection ? A:-     A collection represents a group of objects. And it is root interface of java collection hierarchy. Q:-3   What is Collections ? A:-     Collections is a utility class in java which is present is java.util package for manipulating  data. It provides static method for             searching, sorting and more. Q:-4   What is difference between Array and Collection ? A:-                 Array       ...

Html Basics

  image source - google 1: What is HTML ? A:  HTML is a Hiper Text Markup Language, it's basicaly means we can structure our web document throw html markups.If we want to make a web page or web documrnt then we have to first start with the html, like this, <Html>     <Head>     </Head>     <Body>     </Body> </Html> 2: What is <Head>? A: Head is a child tag of Html, this comes under the html parent tag, and it contains the the information about the html page, like css file link, js file link, meta info. , screen size info, and other if you are using bootstrap or popper.js or any jquery file link. 3: What is <Body>? A: Body is also a child tage of html tag but it contain's the data which visible on the wab page only.             like, Tables, Images, List's, Drop Down etc.. 4: Which  basics thing's that we have to remember in general at the t...