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
How to buy free big money computers that earn free money everydays?
Novay_Z [31]
That would be great if it was possible
8 0
2 years ago
Which of the following is NOT true of constructors? Question 6 options
LenKa [72]

Answer:

All are True

Explanation:

a. A constructor must have the same name as that of a class. For example

public class MyFirstClass{  // this is the class name

  public MyFirstClass() } // the constructor having the same name as class.

b. Constructors never have a return type not even void because it is only used to initialize the values of data members of the class when the object of the class is created so constructors are not directly called hence they do not need to have a return type.

c. Constructors are invoked using the new operator.

When the new object is created the constructor is invoked in order to initialize the variables of a class. The memory is allocated to the object and then the constructive is invoked for the purpose to initialize the object.

7 0
3 years ago
In which of the following situations is having a good credit score important?
Triss [41]
<span>The correct answer is to be able to loan from banks. Having a good credit score, impacts one's approval for bank loans. It will enable a person to have a higher chance of getting his or her loan, approved by the banks, than those who have low credit scores. </span>
8 0
3 years ago
____ is scientifically seeking and discovering facts.
galina1969 [7]

Answer:

I believe it is science, but before you do anything with this answer, research more on it, just in case I'm wrong! :)

Explanation:

3 0
2 years ago
Attacking systems by exploiting otherwise unknown and unpatched vulnerabilities is also known as:
Nostrana [21]

Answer:

Zero-day exploits

Explanation:

Zero-day exploits refers to recently found vulnerabilities in a computer software program that has been in existence but was hitherto not known and addressed by the software security experts, however, these vulnerabilities were known to hackers. While the existence of these "loop-holes" in the software can go on unnoticed for several years, hackers can take advantage of it to cause harm to the computers' programs and data.

When these attacks occur, it is called a zero-day because the attack took place on the very day that the loop-hole was discovered in the software. So exploitation has already taken place before a fix is carried out.

5 0
3 years ago
Other questions:
  • Whereas lines of competition are clearly defined in the more established industries, in the Internet industry they are blurred a
    9·1 answer
  • Assume the following variable definitions int a = 5, b = 12; double x = 3.4, z = 9.1. What are the values of the following expre
    7·1 answer
  • An investigator obtains consent and HIPAA authorization from subjects to review their medical records and HIV status. He plans t
    8·1 answer
  • Carson's supervisor has asked him to review a variety of portable computers for possible purchase for their company's employees.
    13·1 answer
  • Write the steps for displaying multiple subtotal functions in excel.
    10·1 answer
  • .What particular skills does a team leader need in addition to the other skills needed by any team member. (choose all that appl
    6·1 answer
  • The first known permanent photograph was called "View from the Window at Le Gras." True False
    9·1 answer
  • A UI text element must be added to ______.an empty background container game objecta prefaba slot game objecta tray objecta canv
    6·1 answer
  • 9.19 LAB: Words in a range (lists) Write a program that first reads in the name of an input file, followed by two strings repres
    6·1 answer
  • Which describes the Paradox of Automation?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!