@koustuvsinha/

LazyPartialMoth

Java

No description

fork
loading
Files
  • Main.java

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.809488624744094","path":"Main.java","file":{"path":"Main.java","content":{"asEncoding":{"base64":"Y2xhc3MgQ2FyIHsKICAvLyBjYXIgbmFtZQogIHByaXZhdGUgU3RyaW5nIG5hbWU7CgkvLyBjYXIgbWFubnVmYWN0dXJlciBuYW1lCglwcml2YXRlIFN0cmluZyBtYW51ZmFjdHVyZXJOYW1lOwogIC8vIGNvbnN0cnVjdG9yCglwdWJsaWMgQ2FyKFN0cmluZyBuYW1lLCBTdHJpbmcgbWFuKSB7CgkJdGhpcy5uYW1lID0gbmFtZTsKCQl0aGlzLm1hbnVmYWN0dXJlck5hbWUgPSBtYW47Cgl9CiAgLy8gZ2V0dGVyIG1ldGhvZAoJcHVibGljIFN0cmluZyBnZXROYW1lKCkgewoJCXJldHVybiBuYW1lOwoJfQogIC8vIGdldHRlciBtZXRob2QKCXB1YmxpYyBTdHJpbmcgZ2V0TWFudWZhY3R1cmVyTmFtZSgpIHsKCQlyZXR1cm4gbWFudWZhY3R1cmVyTmFtZTsKCX0KCiAgLy9zZXR0ZXIgbWV0aG9kCiAgcHVibGljIHZvaWQgc2V0TmFtZShTdHJpbmcgbmFtZSl7CiAgICAgdGhpcy5uYW1lID0gbmFtZTsKICB9CQp9CgpjbGFzcyBNYWluIHsKICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICBDYXIgbW9kZWxTID0gbmV3IENhcigiTW9kZWwgUyIsIlRlc2xhIik7CgoJU3lzdGVtLm91dC5wcmludGxuKCJGdWxsIENhciBOYW1lID0gIiArIG1vZGVsUy5nZXRNYW51ZmFjdHVyZXJOYW1lKCkgKyAiICIgKyBtb2RlbFMuZ2V0TmFtZSgpKTsKCS8vIHByaW50cyBUZXNsYSBNb2RlbCBTCiAgfQp9"},"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
30
31
32
33
class Car {
  // car name
  private String name;
	// car mannufacturer name
	private String manufacturerName;
  // constructor
	public Car(String name, String man) {
		this.name = name;
		this.manufacturerName = man;
	}
  // getter method
	public String getName() {
		return name;
	}
  // getter method
	public String getManufacturerName() {
		return manufacturerName;
	}

  //setter method
  public void setName(String name){
     this.name = name;
  }	
}

class Main {
  public static void main(String[] args) {
    Car modelS = new Car("Model S","Tesla");

	System.out.println("Full Car Name = " + modelS.getManufacturerName() + " " + modelS.getName());
	// prints Tesla Model S
  }
}