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
What is the target audience for this poster?
bija089 [108]

Answer:

there is no car on a bus a bus is one long vehicle

Explanation:

7 0
3 years ago
Read 2 more answers
Any executable files???
Kipish [7]

Doesn't look like there are any..

7 0
3 years ago
How does ur computer know that its cursor moved
Anton [14]
The sensor of a mouse connected to the computer or the touch pad being touched and swiped around on
8 0
3 years ago
Read 2 more answers
One method of encoding messages is known as the "expanding square code". this method encodes message by placing the character of
mars1129 [50]
Wow!! that is ALOT of info,I dont think i could help with this one Umders 699 maybe someone else can sorry that i couldn`t help :)
4 0
3 years ago
Secure Hashing Algorithm (SHA) is an algorithm for generating cryptographically secure one-way hash, published by the National I
Naily [24]

Answer:

64 byte.

It's not bit is byte.

Explanation:

Secure Hash Algorithms (SHA) :- These are a family of cryptographic hash functions. There are basically four types of secure hash algorithms for generating cryptographically secure one-way hash.They are as following:-

SHA-0

SHA-1

SHA-2

SHA-3

SHA -2 consists of SHA-512 and the block size used by it is 64 byte or 512 bits.

8 0
3 years ago
Other questions:
  • Adam discovers a virus on his system that is using encryption to modify itself. the virus escapes detection by signature-based a
    14·1 answer
  • How do you uninstall a program using the Control Panel?
    10·1 answer
  • Which windows tools would you use to browse the files system on a hard drive?
    6·2 answers
  • The clear emergence of a leader and the development of group norms and cohesiveness are the key indicators of the ________ stage
    6·1 answer
  • Create a class named Console, and move all the methods that retrieve and validate user input to that class. These methods can re
    7·1 answer
  • You want to configure two DHCP servers; one is running Windows Server 2012 R2, and the other is running Windows Server 2016. One
    9·1 answer
  • Besides earning money why do people work​
    6·2 answers
  • Pls help I will give points
    7·1 answer
  • 15. Virus cannot infect files that are saved in i. USB ii. CD-ROMs iii. Memory card iv. All of them​
    14·2 answers
  • How can a classroom be more effective by the use of multimedia? ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!