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:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q5: Write a statement to define each of
Q6: Consider the following source code. What should
Q7: Where is the error in the following
Q8: Write a Java statement to calculate the
Q9: Write Java statements to instantiate a random
Q11: Convert the String input below to a
Q12: If you want to use the Random
Q13: A String variable named s has been
Q14: A String variable named email contains the
Q15: Complete the code, changing the fill color
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents