import java.io.*; import java.util.*; public class Greeter { // static makes the variable // shared by all instances //static private String greeting; /* You can initialize instance variables when you declare them, like this */ //private String greeting="Hello"; private String greeting; public Greeter(String g) { greeting=g; } public void setGreeting(String greet) { greeting = greet; } public String greet(String name) { String message; message = greeting + " " + name; return message; } }