Salve a tutti. Avrei un problema di interpretazione con due file java collegati fra loro
primo file java:
ed il secondo:codice:public class Customer { public int customerID = 0; // Default ID for the customer public char status = 'N'; // default public double totalPurchases = 0.0; // default // This method displays the values for an item public void displayCustomerInfo() { System.out.println("Customer ID: " + customerID); System.out.println("Status: " + status); System.out.println("Purchases: " + totalPurchases); } // end of display method } // end of class
Ciò che non capisco sono le ultime due righe dell'ultimo file: che funzione è " Customer myCustomer "? e myCustomer.displayCustomerInfo() che vuol dire? E un'ultima cosa le parentesi tonde vuote che vogliono dire?codice:public class CustomerTest { public static void main (String args[]) { Customer myCustomer = new Customer(); myCustomer.displayCustomerInfo(); } }
Grazie in anticipo.


