Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

java polymorhism

Language: Editor: Layout:
+ ] Show input
Compilation time: 0.73 sec, absolute service time: 0,85 sec 
edit mode |  history  | discussion
Error(s), warning(s):
source_file.java:7: error: class Vehicle is public, should be declared in a file named Vehicle.java
public class Vehicle{
       ^
source_file.java:79: error: class Truck is public, should be declared in a file named Truck.java
public class Truck extends Vehicle {
       ^
source_file.java:159: error: class Car is public, should be declared in a file named Car.java
public class Car extends Vehicle {
       ^
source_file.java:205: error: class Unit6Assign is public, should be declared in a file named Unit6Assign.java
public class Unit6Assign {
       ^
4 errors