public class WhoAmI{
private String name;
private String job;
private String[] hobbies;
private String location;
public WhoAmI(String name, String job, String[] hobbies, String location){
this.name = name;
this.job = job;
this.hobbies = hobbies;
this.location = location;
}
public String getName() {
return name;
}
public String getJob() {
return job;
}
public String[] getHobbies() {
return hobbies;
}
@Override
public String toString() {
return("Hi my name is "+ this.getName()+ ", from" + this.getLocation() +
"! My Job is "+ this.getJob()+" and my hobbies are " + this.getHobbies();
}
public static void main(String[] args) {
whoAmI vinesh = new WhoAmI(
"Vinesh Ghela",
"QA Developer",
["Reading", "Trying new food","Gym" ,"Chasing Semi-colons"],
"London, United Kingdom");
System.out.println(vinesh);
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
vineshghela/VineshGhela
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