Horje
super class java Code Example
super class java
/* Base class vehicle */
class Vehicle
{
    int maxSpeed = 120;
}
  
/* sub class Car extending vehicle */
class Car extends Vehicle
{
    int maxSpeed = 180;
  
    void display()
    {
        /* print maxSpeed of base class (vehicle) */
        System.out.println("Maximum Speed: " + super.maxSpeed);
    }
}
  
/* Driver program to test */
class Test
{
    public static void main(String[] args)
    {
        Car small = new Car();
        small.display();
    }
}




Java

Related
java random threadlocalrandom double with 2 decimal places Code Example java random threadlocalrandom double with 2 decimal places Code Example
threads array java Code Example threads array java Code Example
java importieren Code Example java importieren Code Example
similar thing as pair in c++ in java Code Example similar thing as pair in c++ in java Code Example
copy array of objects in java Code Example copy array of objects in java Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10