<<< The new operator | Index | How to import Java classes >>> |
Syntax to call a method from an object:
objectName.methodName( arguments )
For example,
double subtotal = sc.nextDouble(); // get a double entry from the console String currentDate = now.toString(); // convert the date to a string
<<< The new operator | Index | How to import Java classes >>> |