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
zvonat [6]
3 years ago
5

YOOO CAN ANYONE SOLVE THIS IN JAVA??

Computers and Technology
2 answers:
3241004551 [841]3 years ago
5 0

public class JavaApplication80 {

   public static String swapLetters(String word){

       char prevC = '_';

       String newWord = "";

       int count = 0;

       if (word.length() % 2 == 1 || word.isBlank()){

           return word;

       }

       else{

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

               char c = word.charAt(i);

               if(count % 2 == 1){

                   newWord  += (c +""+ prevC);

               }

               prevC = c;

               count+=1;

               

           }

       }

       return newWord;

   }

   public static void main(String[] args) {

       System.out.println(swapLetters("peanut"));

   }

   

}

This works for me. Best of luck.

WARRIOR [948]3 years ago
5 0

Answer:

I do not know

Explanation:

You might be interested in
Which of the following is an example of machine learning?
babymother [125]

Answer: auto correct

Explanation: The iPhone can determine what you are going to type because of your past history.

8 0
2 years ago
Within a single program, __________________ allows multiple parts, or threads, to run simultaneously.
jekas [21]
<span>It should be single-user/multitasking os.</span>
4 0
4 years ago
What computer part do you need to make you’re pc run faster?
Alisiya [41]
There are multiple things that effect the speed of your computer such as the processer, RAM, and what is on the computer itself. The first question would be to figure out what might be slowing down your computer and the reason for needing the increase in speed. This will tell you what part you need and the steps to take.
3 0
3 years ago
The term computer ________ is used to describe someone who is familiar enough with computers to understand their capabilities an
kenny6666 [7]

Answer:

Literate

Explanation:

A computer literate is a person that is high in knowledge and skill with computers, knowing the device inside and out

5 0
4 years ago
Which of the following information would best be displayed throughout the use of a time line
timama [110]

D. a list of all your birthdays including the years...

3 0
3 years ago
Read 2 more answers
Other questions:
  • Information gathered from observing a plant grow 3 cm over a two-week period results in _______.a. inferences. b. variables. c.
    11·1 answer
  • Sabiendo que el engranaje motriz tiene 14 dientes y gira a 4000 RPM, y el conducido tiene 56 dientes, responde:
    11·1 answer
  • What does it mean to have an "online presence"? Explain how it can affect a job search?
    11·1 answer
  • What is the value of i printed? j = i = 1 i += j + j * 5 print("What is i?", i)
    11·1 answer
  • Solid state components are less likely to fail because they:______.a. are driven by precise sets of software instructions. b. ha
    8·1 answer
  • You must. place a child in a federally approved child restraint device. if the child is
    5·2 answers
  • Assume that sentence is a variable that has been associated with a string consisting of words separated by single space characte
    5·1 answer
  • Why would online learning make you lazy
    13·1 answer
  • What is the command to list files in Unix and Unix like operating system?​
    15·1 answer
  • In order to restrict editing to a document, a user will go to Review, , Restrict Editing, and will then select what kinds of edi
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!