Program 6.11: OOPTest with toString

Program 6.11 is an OOPTest that uses toString and System.out.println instead of print and thus works with the new website class.

public class OOPTest {

    public static void main(String args[]) {
  
      website w = new website("Cafe Au Lait",
        "http://sunsite.unc.edu/javafaq/", 
        "Really cool!");
      System.out.println(w);
  
  }

}

Copyright 1996 Elliotte Rusty Harold
elharo@sunsite.unc.edu
This Chapter
Examples
Home