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
myrzilka [38]
4 years ago
8

Write code that uses the input string stream inSS to read input data from string userInput, and updates variables userMonth, use

rDate, and userYear. Sample output if the input is "Jan 12 1992": Month: Jan Date: 12 Year: 1992
Computers and Technology
1 answer:
Lostsunrise [7]4 years ago
3 0

The Code Looks Like this :

import java.util.Scanner;
public class StringInputStream {
public static void main (String [] args) {
Scanner inSS = null;
String userInput = "Jan 12 1992";
inSS = new Scanner(userInput);
String userMonth = "";
int userDate = 0;
int userYear = 0;
/* Your solution goes here */
inSS.useDelimiter(" ");
userMonth=inSS.next();
userDate=inSS.nextInt();
userYear=inSS.nextInt();
System.out.println("Month: " + userMonth);
System.out.println("Date: " + userDate);
System.out.println("Year: " + userYear);
return;
}
}

Out Put:

Month: Jan

Date: 12

Year: 1992
You might be interested in
Write a function that takes as input a single parameter storing a list of integers and returns the minimum, maximum, and average
Alex Ar [27]

Answer:

hi im coolkid 1000

Explanation:

just 5 robuk

6 0
3 years ago
Which event represents an example of social media being used in an
Semmy [17]
Hello!

The answer is:
-D. Communication with friends and family after other systems were disabled by a major earthquake.

I hope this helps you! :)
7 0
2 years ago
Assuming deq is a deque object, the expression deq.push_front(elem) deletes the first element from deq.
horrorfan [7]

Answer: False

Explanation:

This code code not deletes element from deq. This insert element at the beginning of deq. if it was deq.pop_front(elem) then it would have deleted the first element.

Therefore, it is false.

4 0
3 years ago
What is a clutch on a car
grandymaker [24]
<span>The first stage in the transmission of a car with a manual gearbox is the clutch.</span>
6 0
4 years ago
c724 wgu True or false. A storage device consists of all the components that work together to process data into useful informati
Law Incorporation [45]

Answer:

False

Explanation:

A output device consists of all the components that work together to process data into useful information

8 0
3 years ago
Other questions:
  • Need Help ASAP!
    14·2 answers
  • What is the benefit to having the user interface integrated into the operating system? a) Power users prefer the added flexibili
    13·1 answer
  • The statement cout &lt;&lt; sales[0,3] + sales[1,3]; will __________. Use the following array named sales to answer this questio
    14·1 answer
  • Storage device that is installed inside your computer is called?
    7·1 answer
  • Now tell me how be rich like Bill Gates
    6·1 answer
  • An example of a ______ in the United States are computer hackers, whose members engage in actions that subvert authority, disrup
    6·1 answer
  • ____ is one of the primary operations of a computer.
    10·1 answer
  • Use a for/else loop to traverse through the key names in the dictionary below in order to find Mr. Potatohead’s mailing address.
    7·1 answer
  • A list is sorted by selecting the largest element in the list and swapping it with the last one. This technique is called ______
    7·1 answer
  • Which of these does an operating system use to organize files?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!