public class ComputerScientist {
private String name;
private String university;
private String[] interests;
public ComputerScientist() {
this.name = "Donatello Grahame Carboni";
this.university = "University of Pretoria";
this.interests = new String[] {"My girlfriend", "Artificial Intelligence", "Linux",
"Cryptocurrency", "Formula 1"};
}
public void sayHi() {
System.out.println("Hi, I am " + name + " and I am a third year student at the " +
university + "!");
System.out.println("I use Arch BTW");
}
public void sayInterests() {
System.out.println("My interests are: ");
for (String interest : interests) {
System.out.println(interest);
}
}
public static void main(String[] args) {
ComputerScientist me = new ComputerScientist();
me.sayHi();
me.sayInterests();
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Donatello-Carboni/Donatello-Carboni
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published