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
san4es73 [151]
4 years ago
14

JAVA Code:

Computers and Technology
1 answer:
Burka [1]4 years ago
6 0
Dear ,you should ask it on stackoverflow and geekforgeelks , not here
You might be interested in
A type of authentication that requires the user to provide something that they know, such
bagirrra123 [75]
The answer would be true
5 0
3 years ago
How many passes will it take to find the four in this list?
earnstyle [38]

Answer:

3 is the correct answer

I got correct on my test

7 0
3 years ago
Read 2 more answers
Households pay taxes to the government and receive public services. Which of the following is a public service?
Gwar [14]
C. Roads  this is the correct answer
8 0
3 years ago
Write a method named removeDuplicates that accepts a string parameter and returns a new string with all consecutive occurrences
Nitella [24]

Answer:

//Method definition

//Method receives a String argument and returns a String value

public static String removeDuplicates(String str){

       //Create a new string to hold the unique characters

       String newString = "";

       

       //Create a loop to cycle through each of the characters in the

       //original string.

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

           // For each of the cycles, using the indexOf() method,

           // check if the character at that position

           // already exists in the new string.

           if(newString.indexOf(str.charAt(i)) == -1){

               //if it does not exist, add it to the new string

               newString += str.charAt(i);

           }  //End of if statement

       }   //End of for statement

       

       return newString;   // return the new string

   }  //End of method definition

Sample Output:

removeDuplicates("bookkeeeeeper") => "bokeper"

Explanation:

The above code has been written in Java. It contains comments explaining every line of the code. Please go through the comments.

The actual lines of codes are written in bold-face to distinguish them from comments. The program has been re-written without comments as follows:

public static String removeDuplicates(String str){

       String newString = "";

       

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

           if(newString.indexOf(str.charAt(i)) == -1){

               newString += str.charAt(i);

           }

       }

       

       return newString;

   }

From the sample output, when tested in a main application, a call to removeDuplicates("bookkeeeeeper") would return "bokeper"

7 0
3 years ago
Adobe Indesign project 4 museum indesign file. The instructions are 70 pages long I cant sit still long enough to read them
Alchen [17]

Answer:

? Read on to learn about the possible reasons and resolutions. ... Check whether you have the latest update installed for InDesign. ... InDesign cannot open the file when your system does not have enough memory ... Copy page elements into a new document.

Explanation:

4 0
3 years ago
Other questions:
  • When uninstalling software, it is best to delete the folder containing the software?
    11·1 answer
  • Ned and mary ann are saving their files to a cd
    15·1 answer
  • ​PeroxyChem's IT staff was able to free its IT staff to spend less time on routine maintenance and more time on strategic tasks
    11·1 answer
  • If you want to be more efficient at using the World Wide Web, refresh the page often.
    7·1 answer
  • Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
    6·1 answer
  • What feature allows you to access previous copies of a document on OneDrive?
    15·2 answers
  • The auxiliary device used to store large volume of data and program for future is called​
    10·1 answer
  • I'm showing my friends brainly. Answer with anything so they can see how fast I can get answers.
    10·2 answers
  • Describe four traditional tehniques for collecting information during analysis.
    11·1 answer
  • Which wireless standard runs on both the 2.4 and 5 GHz frequencies?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!