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]
3 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]3 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
PLS CAN ANYONE HELP ME
Nesterboy [21]

The exercise contains 15 questions. The solution is provided for each question.

Each question contains the necessary skills you need to learn.

I have added tips and required learning resources for each question, which helps you solve the exercise. When you complete each question, you get more familiar with a control structure, loops, string, and list.

Use Online Code Editor to solve exercise questions.

Also, try to solve the basic Python Quiz for beginners

Exercise 1: Given two integer numbers return their product. If the product is greater than 1000, then return their sum

Reference article for help:

Accept user input in Python

Calculate an Average in Python

Given 1:

number1 = 20

number2 = 30

Expected Output:

The result is 600

Given 2:

number1 = 40

number2 = 30

Expected Output:

The result is 70

Explanation:

4 0
2 years ago
Sue is installing a printer. What program will she need to get the printer to work with her computer? Specify some functionaliti
umka21 [38]

Answer:

Utility software tool​

Explanation:

After connecting the printer and turning it on, you'll need to install the printers software and drivers. Every printer should come with the software used to install a printer in Windows or your operating system.

8 0
2 years ago
Create a statement trigger called "bt_maj_adv_trigger" that would be work with both advisor as well as major table. If a record
denis23 [38]

Answer:

Create or replace trigger at_advisor

after delete or insert or update on advisor

for each row

Begin

  if inserting

then

  insert into

     log_maj_adv

  values

     (

        user, :new.adv_code, sysdate, 'insert'

     )

;

elsif deleting

then

  insert into

     log_maj_adv

  values

     (

        user, :new.adv_code, sysdate, 'delete'

     )

;

else

  insert into

     log_maj_adv

  values

     (

        user, :new.adv_code, sysdate, 'update'

     )

;

end if;

End;

Explanation:

as per above answer.

5 0
3 years ago
Read 2 more answers
having one password for all accounts is an easy way to remember passwords, but it will expose you to what risk?
VLD [36.1K]
If all accounts you have have the same password, then if someone gets the password to one account, then that person has access to all your accounts.
4 0
3 years ago
Me brown uses a modern technological machine to till his lands and preform task that require high power. This machine has a GDP
tresset_1 [31]

Answer:

you can look it up if you want to just look up modern technological machine  and u will get it.

8 0
3 years ago
Other questions:
  • For some people , alcohol can cause an uncontrollable blank of the eyes , making good vision almost impossible
    5·1 answer
  • A word processing program would probably be used to: 
    8·1 answer
  • Select the correct answer.
    15·1 answer
  • Code written by computer programmers is translated to binary code, so computers can understand the instructions. True or False
    7·1 answer
  • Based on the module,
    9·1 answer
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • Update thejavafile names to include your initials at the end, send .java file only.1. Completein-place heapSort, which takes an
    11·1 answer
  • Is a free verse a poetry that has no images
    5·2 answers
  • Design a loop that asks the user to enter a number. The loop should iterate 10
    15·1 answer
  • : Describe the type of gameplay seen during early video games (ex. Spacewar!, Pong).
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!