Solved

Complete This Code in Main to Perform the Requested Operations

Question 10

Essay

Complete this code in main to perform the requested operations for a date entered by the user in this format: month dd, yyyy.
public static void main( String [] args )
{
Scanner scan = new Scanner( System.in );
System.out.print( "Enter a date > " );
String date = scan.nextLine( );
Output the first letter in the month.
Output the date in all lowercase letters.
Output the year portion of the date-that is, the characters in the date that follow the comma. For example, if the date is February 24, 2016, you would output 2016. (Note: Your code should work for ANY date in that format.)

Correct Answer:

verifed

Verified

System.out.println( "The 1st letter in t...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents