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
Why is continual user involvement a useful way to discover system requirements? Under what conditions might it be used? Under wh
True [87]

Answer:

continual user involvement gives the flexibility to analyze the requirements in right direction. because there is continuous meetings with the end user and he can provide right direction or avoids wrong interpretation of the requirement

Explanation:

continual user involvement is useful when we are following agile methodology where we are building complex systems. it is not useful for simple sytems and following waterfall methodology

7 0
3 years ago
Which wireless communication is typically limited to six feet of distance?
Anni [7]

Answer:

nfc

Explanation:

8 0
4 years ago
The ________ of the operating system enables the user to communicate with the computer system. Select one:
mojhsa [17]
The user interface (correct answer is a)
8 0
3 years ago
How can security professionals use software to recover stolen laptops ?
inna [77]

<u>Answer is:</u>

E). They monitor email traffic.

<u>Explanation:</u>


Track Your Device's IP Address with mail. If your laptop or smartphone was stolen, you can use a service like mail to find the IP address of your thief. When you log into those services from any computer, it logs the IP address used, and displays your last used IP in your account. So, these are source for finding the stolen laptop and smartphones.

I hope you got the idea. Thanks

3 0
3 years ago
Which of the following need NOT be completed separately if a worksheet is prepared?
Anika [276]
C because you already have you sheet prepared
3 0
4 years ago
Other questions:
  • Sweet thas 2 orange picks for every 5 green picks if there is 21 pick are in all how many picks are orange
    7·1 answer
  • What information on social networking sites could be used to discriminate against a potential employee
    9·1 answer
  • Which tab provides commands for the most commonly used elements in Word software?
    15·1 answer
  • A palindrome number is a number that remains the same when its digits are reversed. Like 16461, for example, is a palindrome num
    13·1 answer
  • You open the home page for www.alpineskihouse. On the home page, you see a link for the weather report. You want to view the wea
    6·1 answer
  • The__ key is used to group or identify a field or record within a table. (you don't need it).
    5·2 answers
  • Please answer that and i'll gave you branlliest
    15·1 answer
  • A signal has a wavelength of 1 11m in air. How far can the front of the wave travel during 1000 periods?
    7·1 answer
  • A specialized output device for producing charts, maps, and very high-quality drawings is
    5·1 answer
  • The _____ of a story describes the time and location of a story.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!