Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Class inheritance and encapsulation


public class Driver {

        

        public static void main(String[] args) {
//              test case.
                SavingsAccount sa = new SavingsAccount("hdfc", "delhi", 10);
                System.out.println("amount: " + sa.calculateAmount(1000));
        }

}
Source by www.chegg.com #
 
PREVIOUS NEXT
Tagged: #Class #inheritance #encapsulation
ADD COMMENT
Topic
Name
8+3 =