@koustuvsinha/

WhiteDescriptiveBrahmancow

Java

No description

fork
loading
Files
  • Main.java

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.5245325970322161","path":"Main.java","file":{"path":"Main.java","content":{"asEncoding":{"base64":"Y2xhc3MgVmVoaWNsZSB7CgkKCWludCBudW1PZlNlYXRzID0gMDsKCQoJcHVibGljIFZlaGljbGUoaW50IG51bSkgewoJCS8vIGNvbnN0cnVjdG9yCgkJdGhpcy5udW1PZlNlYXRzID0gbnVtOwoJfQoJcHVibGljIHZvaWQgc3RhcnQoKSB7CgkgIFN5c3RlbS5vdXQucHJpbnRsbigiVmVoaWNsZSBzdGFydCBjb2RlIik7CgkgIFN5c3RlbS5vdXQucHJpbnRsbigiTnVtYmVyIG9mIHNlYXRzIDogIiArIHRoaXMubnVtT2ZTZWF0cyk7Cgl9Cn0KCmNsYXNzIENhciBleHRlbmRzIFZlaGljbGUgewoJcHVibGljIENhcigpIHsKCSAgc3VwZXIoNCk7ICAvLyB3ZSBwYXNzIDQgYXMgdGhlIHBhcmFtZXRlciBvZiB0aGUgcGFyZW50IGNsYXNzIGNvbnN0cnVjdG9yCgl9CglwdWJsaWMgdm9pZCBydW4oKSB7CgkgIHN1cGVyLnN0YXJ0KCk7CiAgfQp9CgpjbGFzcyBNYWluIHsKICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICBDYXIgdGVzbGEgPSBuZXcgQ2FyKCk7CiAgICB0ZXNsYS5zdGFydCgpOwogIH0KfQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Vehicle {
	
	int numOfSeats = 0;
	
	public Vehicle(int num) {
		// constructor
		this.numOfSeats = num;
	}
	public void start() {
	  System.out.println("Vehicle start code");
	  System.out.println("Number of seats : " + this.numOfSeats);
	}
}

class Car extends Vehicle {
	public Car() {
	  super(4);  // we pass 4 as the parameter of the parent class constructor
	}
	public void run() {
	  super.start();
  }
}

class Main {
  public static void main(String[] args) {
    Car tesla = new Car();
    tesla.start();
  }
}