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
lys-0071 [83]
3 years ago
7

Assign the size of userInput to stringSize. Ex: if userInput is "Hello", output is: Size of userInput: 5

Computers and Technology
1 answer:
Basile [38]3 years ago
8 0

Answer:

import java.util.Scanner;

public class StringSize {

  public static void main (String [] args) {

     Scanner scnr = new Scanner(System.in);

     String userInput;

     int stringSize;

     userInput = scnr.nextLine();

     

     /* Your solution goes here  */

     

     stringSize = userInput.length();

     

     System.out.println("Size of userInput: " + stringSize);

     return;

  }

}

Explanation:

stringSize = userInput.length();  //  userInput.length() will get the length of the string and  put in stringSize

You might be interested in
Can you list the answers in order
viva [34]

whats the question?????????????????????

5 0
2 years ago
Draw the final structure that will house the electronic system​
Natasha_Volkova [10]

Answer:

1. TECHNOLOGY GRADE 9 TERM 3. In this chapter, you will revise the work you did on electrical systems and control

Explanation:Circuits can be found in just about every electronic device you ... An electric circuit is in many ways similar to your circulatory system

4 0
2 years ago
What is the pennsylvania law on cyber bullying
gizmo_the_mogwai [7]
Convicted of a criminal offense may face fines,imprisonment.hope that and you got it right.
8 0
3 years ago
The police department in the city of Computopia has made all streets one-way. The mayor contends that there is still a way to dr
Korvikt [17]

Answer:

a

Explanation:

6 0
2 years ago
What does this mean?
8090 [49]

Answer:

That you have just wasted your time typing up a seemingly random number sequence.

4 0
2 years ago
Read 2 more answers
Other questions:
  • 14. Blender® does not typically use pop-up boxes. (1 point)
    7·1 answer
  • Even if you cannot afford it you should donate at least 5 of your earnings to charity true or false
    8·1 answer
  • Claire writes a letter to her grandmother, in which she describes an amusement park she visited last week. She adds pictures of
    13·1 answer
  • What is processing requirement in computer?
    11·1 answer
  • A reflective cross-site scripting attack (like the one in this lab) is a __________ attack in which all input shows output on th
    14·1 answer
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • X = 10<br> y = 20<br> x &gt; y<br> print("if statement")<br> print("else statement")
    6·1 answer
  • How do you think electronic spreadsheets have transformed businesses today?​
    6·1 answer
  • Complete the sentence.
    12·2 answers
  • Design a circuit that will tell whether a given month has 30 days in it.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!