mirror of
https://github.com/maxmx03/dracula.nvim.git
synced 2026-09-10 07:26:19 -04:00
30 lines
659 B
Java
30 lines
659 B
Java
class Vampire {
|
|
private String location;
|
|
private int birthDate;
|
|
private int deathDate;
|
|
private String[] weaknesses;
|
|
|
|
public Vampire(String location, int birthDate, int deathDate, String[] weaknesses) {
|
|
this.location = location;
|
|
this.birthDate = birthDate;
|
|
this.deathDate = deathDate;
|
|
this.weaknesses = weaknesses;
|
|
}
|
|
|
|
public int getAge() {
|
|
return this.calcAge();
|
|
}
|
|
|
|
public int calcAge() {
|
|
return this.deathDate - this.birthDate;
|
|
}
|
|
}
|
|
|
|
// ...there was a guy named Vlad
|
|
public class dracula {
|
|
Vampire vampire = new Vampire(
|
|
"Transylvania",
|
|
1428,
|
|
1476,
|
|
new String[] { "Sunlight", "Garlic" });
|
|
} |