Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java opp

abstraction is used for security 



def :::
    1. it is the deatail hiding and implementation of the services 
    2. data abstraction deals with exposing the interface to the user and hiding the details of implementation


real world example :::
    1. in car we will only show break and donot show internal parts
    2. in car we will only be showed straing but dont its internal parts 


to achieve abstraction :::
    1. abstract class ( 0 - 100% )
    2. interface      ( 100% )


what is in abstract class :::
    1. variable (no body)
    2. methods  (no body)
    3. methods modifier "abstract"
    4. class modifier   "abstract"   (it have no objects)
 

    note ::
        1. also can be make some concreate method (that have body)
        2. the class which inherte abstract class it will make body of abstract method
        3. "it will use the concept of method overridding"



example :::

    abstract class don{
        int butt ;
        abstract void start(int a);
    }
 
PREVIOUS NEXT
Tagged: #java #opp
ADD COMMENT
Topic
Name
6+9 =