给出以下代码:
提问:给出以下代码:
class Address { private String streetAddress, city, state;private long zipCode; public Address (String street, String town, String st, long zip) { streetAddress = street; city = town; state = st; zipCode = zip;} public String toString() { String result; result = streetAddress + "n"; result += city + ", " + state + " " + zipCode; return result;}}class Student {private String firstName, lastName;private Address homeAddress, schoolAddress;public Student (String first, String last, Address home, Address school) { firstName = first; lastName = last; homeAddress = home; schoolAddress = school;}public String toString() { String result; result = firstName + " " + lastName + "n"; result += "Home Address:n" + homeAddress + "n"; result += "School Address:n" + schoolAddress; return result;}}public class StudentTest { public static void main (String[] args) {Address school = new Address ("38 Zheda Rd.", "Hangzhou","ZJ", 310027); Address jHome = new Address ("20 Yugu Rd.", "Hangzhou","ZJ", 310013);Student john = new Student ("John", "Smith", jHome, school); Address mHome = new Address ("123 Zhongshan Rd.", "Fuzhou", "FJ",350000); Student marsha = new Student ("Marsha", "Jones", mHome, school); System.out.println (john); // System.out.println (); System.out.println (marsha);}}程序运行结果为(一行一空):(1)__________________________(2)__________________________(3)__________________________(4)__________________________(5)__________________________(6)__________________________(7)__________________________(8)__________________________(9)__________________________(10)__________________________(11)__________________________(12)__________________________(13)__________________________(14)__________________________
网友回答: