![]() | ![]() | ![]() | 4.2 Week 2 - A simple program |
Extend your first program so it after it prints your name it then prints the current date. Add the following lines to your program:
import java.util.*; Date now = new Date() System.out.println( "Date: " + now );Add three methods with the same name but different parameter lists. Have the first one with no parameters return an integer zero (0). Have the second one return twice the passed integer. Have the third one return the product of the two passed integers. Write some additional code for
main()
to test your methods.
Turn in a copy of your program and an example run.
![]() | ![]() | ![]() | 4.2 Week 2 - A simple program |