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
malfutka [58]
3 years ago
13

Write a method named secondHalfLetters that accepts a string as its parameter and returns an integer representing how many of le

tters in the string come from the second half of the alphabet (that is, have values of 'n' through 'z' inclusive). Compare case-insensitively, such that uppercase values of 'N' through 'Z' also count. For example, the call secondHalfLetters("ruminates") should return 5 because the 'r', 'u', 'n', 't', and 's' come from the second half of the alphabet. You may assume that every character in the string is a letter.
Computers and Technology
1 answer:
kykrilka [37]3 years ago
4 0

Answer:

The answer to this question can be given as:

Method Definition:

public static int secondHalfLetters(String letters)

{

int count = 0;

for (int i = 0; i < letters.length(); i++)

{

if (Character.toLowerCase(letters.charAt(i)) >= 'n')

{

count++;

}

}

return count;

}

Explanation:

In the above method definition first we declare the method that name is already given in the question that is secondHalfLetters() function. In this function we pass a string parameter that is letters.In the function we declare  an integer variable count.Then we declare the for loop. In this loop we declare the conditional statement in the if block we convert character into lowercase and check that value is greater the equal to n. If this condition is true then it count increase by 1. In the lass we return count value.

You might be interested in
48. Which of the following can be used in the name of a variable?
aleksley [76]

Answer:

Alphabet and digits

Explanation:

A digit cannot be placed at the start of a variable name, but it can be used after the first character has been placed

6 0
3 years ago
Como se diz saia em inglês​
Montano1993 [528]

Answer:

I believe the translation would be "get out", but I'm not sure.

Explanation:

4 0
3 years ago
Read 2 more answers
Which of the following words, if it replaced the word "enthusiasts" in the sentence above, would CHANGE the meaning of the sente
Sonja [21]

Answer:

I would need the sentence to make sure that I am correct but I am pretty sure it is C. aficionados

Explanation:

7 0
3 years ago
Which types of information and resources are usually available on government websites?A.locations and maps
Marta_Voda [28]
Information on government websites are usually things like Locations, Maps, Laws and Regulations. I don't know if you are allowed to answer multiple but, multiple of these are in government websites. I would go with E. Just because I feel like that is the safest bet. Although they do provide maps and locations. Good luck! I hope I helped! :)
3 0
3 years ago
Read 2 more answers
An integrated file is one that includes information created in _____ Office application(s).
maria [59]

The integration of the document and records management in the organizations allows the satisfactory organization of the information, reducing the physical file and the costs while increasing the efficiency of all the business processes.

6 0
3 years ago
Other questions:
  • A coworker is concerned about the veracity of a claim because the sender of an email denies sending it. The coworker wants a way
    6·1 answer
  • ____ is an act, directed at Web sites catering to children, that requires site owners to post comprehensive privacy policies and
    5·1 answer
  • Write a fragment of code that reads in integers from standard input, until end-of-file and sends their (floating point) average
    14·1 answer
  • What word describes a violation of copyright laws? What rights do copyright holders have over their work of art
    5·2 answers
  • Resize vector countDown to have newSize elements. Populate the vector with integers {newSize, newSize - 1, ..., 1}. Ex: If newSi
    6·1 answer
  • Question No. 5:
    7·1 answer
  • List three ways you can help somone who is being cyber bullied instead of just being a bustander​
    7·2 answers
  • 15. It is the process of capturing data or translating information to recording format
    12·1 answer
  • Function of Ribbon in Access 2010​
    7·1 answer
  • State two differences between a mouse pointer and a mouse cursor​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!