Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java opp

Another way to achieve abstraction in Java, is with interfaces.

An interface is a completely "abstract class" that is used to group related methods with empty bodies:



note :::
    1. no concreate 
    2. only abstract

why use :::
    1. achieve abstraction
    2. multiple inheritance
    3. lose coupleing


lose coupleing:::
    it is when we change in one interface it will not change in other class

    
syantx :::
    interface interface_name{
        method      (public abstract) , (public static) , (private)
        fields      (public staic final)
        concreate   (only default)
    } 
    
 
PREVIOUS NEXT
Tagged: #java #opp
ADD COMMENT
Topic
Name
8+6 =