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
Write a for loop to print all NUM_VALS elements of array hourlyTemp. Separate elements with a comma and space. Ex: If hourlyTemp
slavikrds [6]

Answer:

Here are the for loop for the given question.

 for (i = 0; i < NUM_VALS; i++)  // for loop

       {

         /* check if the value of i is equal to NUM_VALS or not.If it is

         equal then just print the value without comma.*/

       if(i==(NUM_VALS-1))  // if block

       System.out.print(hourlyTemp[i]);

  /* if i is not equal then just print the value with comma.*/

       else   // else block

       System.out.print(hourlyTemp[i] + ", ");

       }

Explanation:

In this we iterating the for loop  and check the condition

check if the value of i is equal to NUM_VALS or not.If it is  equal then just print the value without comma

If i is not equal then just print the value with comma .

Output:

90,92,94,95

3 0
3 years ago
Which is the 6-by6 rule for presentations
marin [14]

Answer:

You might already be familiar with the 6×6 rule. This presentation rule suggests that you should include no more than six words per line and no more than six bullet points per slide. The goal is to keep your slide from being so dense and packed with information that people don't want to look at it

7 0
4 years ago
In a black box model are the customers told that they should be expecting to be haxked?
Licemer1 [7]
Uhhhhhhhhhhh maybe tbh i have noooo idea.
6 0
3 years ago
There are many different computer peripherals that are available to optimize your computing system’s specific needs. A graphic d
Rashid [163]

Answer:

Jamal could use a drawing pad. He could draw things out with a stylus and have it on his PC to manipulate. They cost as little as $40.

Felicia could use a mechanical keyboard. Although these are better for nearly everyone, someone who is doing a lot of typing and needing both speed and accuracy should get one. They start at around $50.

Credence could use a printer to print out work to hand in when needed. A decent one starts at around $100.

8 0
3 years ago
What should you do when asked to take down a detailed message for your manager or supervisor?
katovenus [111]
A makes most sense to me. What if you forget that a voicemail was left? Its better to have them call back later. And if the manager isn't there in an hour have them then leave a voicemail.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following Internet business models involves a merchant creating an online digital environment that enables people w
    11·1 answer
  • Your project must satisfy the following requirements:
    7·1 answer
  • What type of computer is likely to use so-dimms, have an internal power supply, and use a desktop processor socket?
    10·1 answer
  • Most operating system is perform these tasks
    14·1 answer
  • You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
    9·1 answer
  • Write a C++ program that stores the integers 50 and 100 in variables and stores the sum of these two in a variable named total.
    11·1 answer
  • I want to discard my old computer and want to securely erase the data from my hard drive what is the process called.
    14·2 answers
  • 1
    13·1 answer
  • What is the introduction of an algorithm and programming and how does it work?
    11·1 answer
  • 22. Write the following in full un computer
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!