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
Ierofanga [76]
4 years ago
5

Write a Java program that generates a new string by concatenating the reversed substrings of even indexes and odd indexes separa

tely from a given string.

Computers and Technology
1 answer:
salantis [7]4 years ago
8 0

Answer:

/ReversedEvenOddString.java

import java.util.Scanner;

public class ReversedEvenOddString {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       String s = sc.nextLine();

       String evens = "";

       String odds = "";

       for(int i = s.length()-1;i>=0;i--){

           if(i%2==1){

               odds += s.charAt(i);

           }

           else{

               evens += s.charAt(i);

           }

       }

       String res;

       if(s.length()%2==1){

           res = evens+odds;

       }

       else{

           res = odds+evens;

       }

       System.out.println(res);

   }

}

You might be interested in
Guys how can i video my self from my laptop <br> my laptop is (lenovo)
dalvyx [7]

Answer:

1

Power up your Thinkpad and press the “Start” button on the screen.

2

Select “All Programs” and click “Capture from Video Device.”

3

Adjust the microphone level to the fourth line and click “NEXT.”

4

Create a file name for the video you will capture and select the destination folder.

5

Select “Best Quality” and click “NEXT.”

6

Click “Start Capture” to commence recording and “Stop Capture” to cease it.

7

Click “Finish.”

Explanation:

3 0
3 years ago
Read 2 more answers
How to copy music from windows media player to pc?
Delvig [45]
<span><span>Click the playlist you want to export, and then click Export Playlist to File on the File menu.
</span><span>In the Save As dialog box, click the folder that contains the playlist you want to export.
</span><span>In the File name box, type a descriptive name for your playlist, and then click OK. This file is saved with a .asx file extension.</span></span>
4 0
3 years ago
Which of the following barriers to oral communication is not the fault of the sender or receiver? being unprepared noise not pay
vredina [299]
All of the given choices are indeed common barriers to oral communication. But among them, "noise" is the only one which may not be the fault of the sender of the receiver. Noise can be generated by nearby sources independent of the sender or receiver.
6 0
3 years ago
Read 2 more answers
Note oj cyber security​
dybincka [34]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

                               "cyber security"

cyber security refers to the body of technologies,Processes and practices designed to protect networks,devices,programs and data from attack,damage or unauthorized  access.Cyber security may also be referred to as information technology security.

Importance:

                         Cyber security is important because government financial and medical organization collect process and store unprecedented amounts of data on computer and other devices.A significant portion of that data can be sensitive information,whether that be intellectual property financial data personal information or other type of data for which unauthorized access or exposure could have negative consequences.organizations transmit sensitive data across network and to other devices in the course of doing business,and cyber security describes the discipline dedicated to protecting that information and the systems  use to process or store it.

Challenges of cyber security:

                  For an effective cyber security an organization needs to coordinates its effort throughout its entire information systems.Elements of cyber components all the following:

  • Network security
  • Application security
  • Endpoint security
  • Data security
  • Identity management
  • Database and infrastructure security
  • cloud security
  • Mobile security

Managing cyber security:

            The national cyber security alliance,through recommends a top down  approach to cyber security in which corporate management leads the change in prioritizing cyber security management across all business practices. NCSA advises that companies must be prepaid to response to the inevitable cyber incident restore normal operations,and ensure that company assets and the company reputation are protected.

7 0
3 years ago
Brian has been working for a few years now and has saved a substantial amount of money. He now wants to invest 50 percent of his
babunello [35]
It should be Money market or CD. I'm leaning towards Money Market account.
8 0
3 years ago
Read 2 more answers
Other questions:
  • 8 POINTS!!!!!!!!
    6·2 answers
  • Why is there a need to compare and align one's PECs of a successful entrepreneur?
    5·1 answer
  • Okay so, not really a question but whatever it’s been bothering me.
    9·2 answers
  • I NEED HELP NOW PLEASE!!!!!!
    6·2 answers
  • If you need assistance with your I-20 which phone number at UC would you call?
    10·1 answer
  • Where is a 3D modeler most likely to work?
    6·1 answer
  • / Looks up author of selected books
    15·1 answer
  • What tool can you use to discover vulnerabilities or dangerous misconfigurations on your systems and network
    5·1 answer
  • Write a method that accepts a string as an argument and checks it for proper capitalization and punctuation. The method should d
    14·1 answer
  • Choose all stages of the information processing cycle.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!