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
A lever has an effort arm that is 8 meters long and the residence (load) arm that is 1.5 meters long, how much effort is needed
andrew11 [14]

Answer:

1066.67 N

Explanation:

Given that two measurements of the arm and an input weight. To answer this problem,we need to balance the forces and use the lengths of the arms. 

Force × effort of arm distance= input weight × load distance

200 N * 8 m = x * 1.5 m

1600 = 1.5x

x = 1600/1.5

x = 1066.666 N

it takes 1066.67 N to lift the input weight

4 0
3 years ago
Implement a recursive method named power that takes 2 integer parameters named base and expo. The method will return the base ra
nika2105 [10]

Answer:

def power(base, expo):

   if expo == 0:

       return 1

   else:

       return base * power(base, expo-1)

Explanation:

*The code is in Python.

Create a method called power that takes base and expo as parameters

Check if the expo is equal to 0. If it is return 1 (This is our base case for the method, where it stops. This way our method will call itself "expo" times). If expo is not 0, return base * power(base, expo-1). (Call the method itself, decrease the expo by 1 in each call and multiply the base)

3 0
2 years ago
a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The marketing department has collect
kherson [118]

Answer:

uh

Explanation:

7 0
2 years ago
When should you create an outline?
liraira [26]

Answer:custom slide show

Explanation:

5 0
2 years ago
For question 1-3, consider the following program: def tryIt(a ,b = 7) return a + b
tino4ka555 [31]

Answer:

1)18

2)4

3)28

Explanation:

1) ans= tryIt(2) *2

        = (2+7)* 2 =18

2) ans= tryIt(-5) *2

        = (-5+7)* 2 =4

3) ans= tryIt(7) *2

        = (7+7)* 2 =28

3 0
3 years ago
Other questions:
  • What is a step by step procedure written to carry out a task?
    11·1 answer
  • Siva added a "Contact Form" to her website.
    10·1 answer
  • What is a mortgage?
    8·2 answers
  • What areas do you need to grow your knowledge in to understand your financial future?
    12·1 answer
  • This is pixlr
    6·1 answer
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • PLEASE HELP. I’ll mark you BRAINLIST <br> Please read the comment under this question
    9·1 answer
  • Looking for friends, anyone up for it?
    12·2 answers
  • Hyperlink is a term used to refer to the specific manner of specifying the address of a website. Write reason for true or false.
    10·1 answer
  • Write a pseudocode algorithm that prompts the user to enter a three-digit number and outputs the hundreds, tens and units.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!