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
umka2103 [35]
3 years ago
12

Write a method that determines the total number of chars in each string of an array.

Computers and Technology
1 answer:
Serjik [45]3 years ago
8 0
The total number of chars in each string is basically the size of each string.

Using JAVA:

        String[] arr = {"hello", "my", "name", "is", "Felicia"};                int count = 0;        for(int i = 0; i < arr.length; i++) {            count = count + arr[i].length();            System.out.println("Characters in " + arr[i] + ": " + count);        }

Output: 
<span>Characters in hello: 5
Characters in my: 7
Characters in name: 11
Characters in is: 13
Characters in Felicia: 20</span>


You might be interested in
Which of the following is the most compelling
Gemiola [76]
To compare data makes the most sense
5 0
3 years ago
Read 2 more answers
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
mylen [45]

Answer:

The program to this question can be described as follows:

Program:

num= int(input('Enter a number: ')) #input value by user

st = '' #defining string variable

while num > 0: #define loop to calculte values binary number

   val= num % 2 # holding remainder (0 or 1) in val variable

   st =st+str(val) # store value in str variable

   num = num//2 #calculte quotient value

print("binary number is: ",st)

Output:

Enter a number: 5

binary number is:  101

Explanation:

Program description as follows:

Firstly the "num" variable is declared, for user input, then an "st" variable is declared, to calculates user input value binary number.

In the next step, a while loop is declared, inside the loop, another variable "Val" is declared, that holds value remainders, which is added on the "st" variable.

Outside the loop, the print method is used, that prints st variable holds value.

3 0
3 years ago
How often should administrators and network users be required to change their password?
Sergeu [11.5K]
Once every 3 month's
8 0
3 years ago
You can easily view the ruler on a document by selecting the Show Ruler button located _____.
Ket [755]
In the “View” tab in the Ribbon.
7 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
Other questions:
  • Earthquakes with magnitudes between 1.0 and 2.9 on the Richter scale are
    11·1 answer
  • Image files are grouped into two categories: _____.
    5·1 answer
  • We never need to use a forward declaration when invoking a public subprogram. true or false?
    15·1 answer
  • How are network computers different from traditional personal computers? describe some usage scenarios in which it is advantageo
    12·1 answer
  • 4.2: Roman Numeral Converter
    9·1 answer
  • All of the following can be caused by the movement of geologic plates EXCEPT
    15·1 answer
  • When you are working in Performance Monitor, in the "Add Counters" dialog box, and need more information about a particular coun
    8·1 answer
  • Fill in the blanks in the SQL statement below that will list the invoice number, invoice total and credit which is the total sum
    14·1 answer
  • Hey guys, I don’t have a problem for you but If anyone knows do you still pass your grade level if you failed 1 class in the las
    11·2 answers
  • Match each of the following terms to its definition: I. web-based II. open source III. project management IV. personal informati
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!