FileDocCategorySizeDatePackage
Application1.javaAPI DocExample1271Fri Sep 14 17:04:58 BST 2001None

Application1.java

// Needed for System.out and System.in
import java.io.*;

public class Application1 {
  //Main method
  public static void main(String[] args) throws IOException {
    // An example of the simplest application possible, the "hello world"
    // application.
    System.out.println("Hello world\nHit enter to continue");
    // Pausing  before the program finishes isn't as simple as you might think.
    // For now, just copy the lines below into your program if a pause
    // is required...
    BufferedReader myIn = new BufferedReader(new InputStreamReader(System.in));
    String s;
    s = myIn.readLine();
  }
}

public class Office {
  // Private data...
  private String name;
  private String address1;
  private String address2;
  private String postcode;
  private String phonenumber;

  // Constructor...
  public Office (String name_in, String address1_in, String address2_in, String postcode_in,
                 String phonenumber_in)
  {
    name = name_in;
    address1 = address1_in;
    address2 = address2_in;
    postcode = postcode_in;
    phonenumber = phonenumber_in;
  }

  public String getName {
     return name;
  }
  public String getAddress1 {
     return address1;
  }
  

}