1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sauron [17]
3 years ago
15

Write a program that asks the user to enter two dates (in YYYY-MM-DD format), and then prints which date is earlier. Your progra

m should print an error message if the user enters an invalid date (like 2019-15-99).
Computers and Technology
1 answer:
Dafna11 [192]3 years ago
4 0

Answer:

import java.util.*;

public class Dates {

   public static void main(String[] args) {

       String January,February, March, April, May, June, July,  

       August, September,October, November, December, month;

       January = February = March = April = May = June = July =  

               August = September = October = November = December = month = null;

       Scanner myScanner = new Scanner(System.in);  

       System.out.print("Enter date in the format mm/dd/yyyy: ");

       String input = myScanner.next();

       String months = input.substring(0,1);

       int monthInt = Integer.parseInt(months);

       if (monthInt == 01){

           month = January;

       }

       else if (monthInt == 02){

           month = February;

       }

       else if (monthInt == 03){

           month = March;

       }

       else if (monthInt == 04){

           month = April;

       }

       else if (monthInt == 05){

           month = May;

       }

       else if (monthInt == 06){

           month = June;

You might be interested in
Brainliest for whoever adds me on snap<br> gianavaughn007
andrey2020 [161]

Answer:

Adding.

Explanation:

6 0
3 years ago
Read 2 more answers
Which describes a design theme in PowerPoint? a set of elements that unify the slides and complement the topic a printed handout
rosijanka [135]

a set of elements that unify the slides and complement the topic

8 0
3 years ago
Read 2 more answers
Which of the following views hides the ribbon and shows text on the screen in an easy-to-read format?: *
natulia [17]

Answer: a)Full Screen Reading

Explanation: Full screen reading is the option present for the reading the text format easily on the system screen .This mode works by minimizing the extra data elements like menus of the screen. The full screen reading mode is usually preferred while there is the requirement of only reading without any editing.

Other options are incorrect because web layout is the layout of the web page, print layout is the tab for printing the layout of page options and draft is the written document which can be edited .Thus , the correct option is option(a)

3 0
4 years ago
To use Aggregate functions on subgroups within the total result set, place the Aggregate function in the Select clause and add t
densk [106]

To use Aggregate functions on subgroups within the total result set, place the Aggregate function in the Select clause and add the Group By clause to the query.

<h3>What is an aggregate function?</h3>

An aggregate function is known to be a tool that functions only by  calculating one or more values and then it also returns a single value.

Conclusively, The aggregate function is a tool that is often employed with the GROUP BY clause and HAVING clause of the SELECT words.

Learn more about  Aggregate functions from

brainly.com/question/15875528

8 0
2 years ago
Line spacing refers to the amount of space between each line in a paragraph
Citrus2011 [14]

Answer:

yes sir, its just the format of the paragraphs

4 0
3 years ago
Other questions:
  • Microsoft Surface can do all of the following except ______.
    12·2 answers
  • Will sum1 come bust me outta FCA....replies u gotta live in knoxville though
    13·2 answers
  • What is the accounting equation?
    12·1 answer
  • What is computer hacking? describe some examples
    6·1 answer
  • You are required to design a 4-bit even up-counter using D flip flop by converting combinational circuit to sequential circuit.
    15·1 answer
  • Match the tool to the task it helps to accomplish. Thesaurus allows the user to find the synonyms and antonyms of a word Smart L
    8·1 answer
  • While saving her word-processed academic documents, Ashley includes the subject, title, and the author's name in the properties.
    7·1 answer
  • What will be the result of running the following code fragment? int year = 0; double rate = 5; double principal = 10000; double
    14·1 answer
  • The SPF strategy can be proven to be optimal in the sense that it minimizes average response times. In this problem, you will de
    10·1 answer
  • Different the policies and protocols in the industry
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!