Run.
import java.util.Scanner;
public class main
{
static String myName = "Chris";
static String yourName = "";
static Profile myObject;
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
yourName = scanner.next();
System.out.print("Hello " + yourName + ", my name is " + myName + ".\n");
myObject = new Profile();
System.out.print(myObject);
}
static class Profile
{
private String message;
private String[] Hobbies = new String[]{"Running","Coding","Magic","Board Games","Computer Games","Juggling"};
public Profile()
{
message = "Some of my hobbies include; ";
for (int i=0;i<Hobbies.length;i++){
message+=Hobbies[i] + "\n";
}
message+="I have been writing code on an off for a few years but have only recently started writing for companies.\n"
+ "I spent a lot of my time on Android Studio, Netbeans and XCode.\n"
+ "I am studying a degree in Computing to become a better programmer.\n"
+ "Fingers crossed it works, eh?";
}
public String toString()
{
return message;
}
}
}