Facebook
From sami, 11 Months ago, written in Java.
Embed
Download Paste or View Raw
Hits: 303
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6.  
  7.  
  8. package javaapplication2;
  9.  
  10. /**
  11.  *
  12.  * @author Student
  13.  */
  14.  
  15.  
  16. class car{
  17.     private void engine()
  18.     {
  19.         System.out.println("Inside of car engine");
  20.     }
  21.     public void cardoor()
  22.     {
  23.         engine();
  24.     }
  25. }
  26. public class JavaApplication2 {
  27.  
  28.     /**
  29.      * @param args the command line arguments
  30.      */
  31.     public static void main(String[] args) {
  32.         // TODO code application logic here
  33.         car carpet = new car();
  34.        
  35.         carpet.cardoor();
  36.     }
  37.    
  38. }
  39.