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
liberstina [14]
2 years ago
13

Edhesive in JAVA Write a method that takes a String parameter. If the String has a double letter (i.e. contains the same letter

twice in a row) then it should return true. Otherwise, it should return false.
This method must be named hasRepeat() and have a String parameter. This method must return a boolean.
Computers and Technology
1 answer:
Marizza181 [45]2 years ago
6 0

I've included my code in the picture below. Best of luck.

You might be interested in
// PrintStrings // Traverse the 2D character array "strings" and print each of the contained strings.// See the example outputs
anzhelika [568]

Answer:

C++.

Explanation:

void printStrings(char strings[NUM_STRINGS][STRING_LENGTH]) {

   // Multi dimension array can be traversed through multi-level loops

   for (int i = 0; i < NUM_STRINGS; i++) {

       for (int j = 0; j < STRING_LENGTH; j++) {

           cout<<"<<strings[i][j]<<";

       }

       cout<<endl;

   }

}

Output would be like this, depending on the size of NUM_STRINGS;

"One"

"Two"

"Three"

....

6 0
3 years ago
Use the arr field and mystery () method below.
kolezko [41]

Answer:

The sum of all positive even values in arr

Explanation:

We have an array named arr holding int values

Inside the method mystery:

Two variables s1 and s2 are initialized as 0

A for loop is created iterating through the arr array. Inside the loop:

num is set to the ith position of the arr (num will hold the each value in arr)

Then, we have an if statement that checks if num is greater than 0 (if it is positive number) and if num mod 2 is equal to 0 (if it is an even number). If these conditions are satisfied, num will be added to the s1 (cumulative sum). If num is less than 0 (if it is a negative number), num will be added to the s2 (cumulative sum).

When the loop is done, the value of s1 and s2 is printed.

As you can see, s1 holds the sum of positive even values in the arr

7 0
3 years ago
Carlos had 194 seeds and 11 flower pots he put the same number of seeds in each flower pot which is the best estimate for the nu
Anon25 [30]

Answer: in solution.

Explanation:

It is basically 194 divided by 11 since we are evenly grouping 194 seeds into 11 pots. This gives 17.636363…

This means that the best estimate is around that number.

6 0
2 years ago
When creating a presentation in Libre Office Impress, where does the editing of slides take place?
kondor19780726 [428]
The Canterbury Tales, written towards the end of the fourteenth century by Geoffrey Chaucer, is considered an estates satire because it effectively criticizes, even to the point of parody, the main social classes of the time. These classes were referred to as the three estates, the church, the nobility, and the peasantry, which for a long time represented the majority of the population.
4 0
3 years ago
You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
julia-pushkina [17]
All formatting for a paragraph is stored in the paragraph mark and carried to the next paragraph when you press the Enter<span> key. </span>
6 0
3 years ago
Other questions:
  • List 7 internal components in a computer system
    8·2 answers
  • The ____________________ packet-filtering firewall allows only a particular packet with a particular source, destination, and po
    10·1 answer
  • Answer these two if u can❤️
    5·2 answers
  • On his computer desktop, Rodney can see several different files, each immediately accessible. Because he is actively working on
    13·1 answer
  • What is a cloud in the world of computing
    7·1 answer
  • The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and eac
    12·1 answer
  • PLEASE HELP FIRST ONE TO ANSWER WILL GET BRAINLIEST!!
    10·1 answer
  • What is a cpu in full explanation?
    7·2 answers
  • Demons I shall be your eternal nightmare
    13·1 answer
  • What would a good digital citizen do if he sees his classmate left her email account open on a school computer by mistake?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!