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
Which of the following is best known as a business network LinkedIn, Facebook, Twitter or Word Press?
Maslowich
The answer is LinkedIn.
 LinkedIn manage your personal identity. It also build and engage in your professional network. It access knowledge, insights and opportunities. It links people, skills and opportunities to create world largest crowd business creation system.

7 0
3 years ago
Where should you look for most objective and unbaised information
jekas [21]
Google, would be the best because of all of the different site, hope this helps!
: )
8 0
3 years ago
Given a Student class, create a class with following characteristics:
Kay [80]

Answer:

ssume that,

Maximum “students” count can be 10.

*Driver Class*

*Solution class*

import java.util.*;

class Student {

private String name;

private int rollNo;

public String getName() {}

public void setName(String name) {}

public int getRollNo() {}

public void setRollNo(int rollNo) {}

};

class ClassRoom {

private int i;

private Student[] students;

public void addStudent(String name, int rollNo) {}

public Student[] getAllStudents() {}

};

8 0
3 years ago
Which of the following correctly identifies a voltage source and its method of developing electric potential?
Semenov [28]
Dry cell- Chemical action
8 0
3 years ago
Read 2 more answers
which tool in administrative tools should you open if you want to view messages to troubleshoot errors? a. resource monitor b. e
VikaD [51]

A tool in administrative tools which you should open if you want to view messages to troubleshoot errors is an: b. event viewer.

<h3>What is an operating system?</h3>

An operating system (OS) can be defined as a system software that's usually pre-installed on a computing device by the manufacturers, so as to manage random access memory (RAM), software programs, computer hardware and all user processes.

<h3>What is an event viewer?</h3>

An event viewer can be defined as an administrative tool that is found in all versions of Windows Operating System (OS) which is designed and developed to enable administrators and end users in viewing the event logs of software application and system messages such as errors on a local or remote machine.

In this context, we can reasonably infer and logically deduce that an event viewer is a tool in administrative tools which you should open if you want to view messages to troubleshoot errors.

Read more on event viewer here: brainly.com/question/14166392

#SPJ1

4 0
2 years ago
Other questions:
  • Look at the circuit shown in the figure above. Switch S1 is open as shown, and R1 and R2 each have a value of 100 k. If you conn
    11·1 answer
  • How can website illustrate cooperations and kidness?
    8·1 answer
  • Computers are often referred to as _____.
    15·1 answer
  • a(n) ___ loop allows you to cycle through an array without specifying the starting and ending points for the loop
    14·1 answer
  • Which value can be entered to cause the following code segment to display the message: "That number is acceptable." int number;
    11·1 answer
  • Please create C program, the task is to implement a function edoublepowerx that has an input parameter x of floating-point value
    11·1 answer
  • FRee points just put something
    14·2 answers
  • What are the possible consequences of intentional virus setting?
    14·1 answer
  • Project: Math Tutor Program with Error Handling
    9·2 answers
  • True or false: if you are adding your own css sheet, make sure your css file comes before the bootstrap css file.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!