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]
3 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]3 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
What command issued from the command prompt will show the route that a packet travels from the issuing computer to another compu
svetoff [14.1K]

Answer:

B)tracert

Explanation:

Tracery Command can be regarded as

network diagnostic tool, it is used in tracking process of pathway of packet ranging from source to destination on IP network. It as well allows to know real time of each hops that are been taken by a packet as it enroutes to it's destination. The traceroute can be run by following these steps:

✓Open the run window

✓Open Command prompt, this can be done by enter "cmd" then enter.

✓ input" tracert" then destination ( Ip address or web address)

It should be noted that Tracery command issued from the command prompt will show the route that a packet travels from the issuing computer to another computer.

6 0
3 years ago
A common use of color in a document is in Table Headers. Which of these is NOT a common way to use color in a table header.
Lesechka [4]
<span>Use a dark color with light-color text to contrast the headers with the data.</span>
3 0
3 years ago
In your own words, describe what an acceptable use
astraxan [27]

The acceptable use policy is known to be a policy that is made up of  practices that all its users need to agree to in order to be able to make use of such network or other resource.

The items are:

  • Social media page .
  • Internet address, applications.
  • Accessing private or confidential information.

<h3>What is an acceptable use policy?</h3>

An acceptable use policy (AUP) is known to be document that is said to tell about the  constraints as well as the practices that a user need to agree to be able to  access a  given corporate network or the Internet.

Therefore, The acceptable use policy is known to be a policy that is made up of  practices that all its users need to agree to in order to be able to make use of such network or other resource.

Learn more about acceptable use policy from

brainly.com/question/2625500

#SPJ1

6 0
1 year ago
The _____ is a storage location for text awaiting pasting.
Tanzania [10]
What's your answers? 
8 0
3 years ago
Read 2 more answers
What is ?
FinnZ [79.3K]

<u>Answer:</u>

A. The opening tag for an HTML document

<u>Explanation:</u>

The question was supposed to be What is < html >?

This tag is used as an opening tag for documents that use HTML.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t
    11·1 answer
  • How to change screen brightness windows 10?
    7·1 answer
  • Choose the word that best completes this sentence. ________ can only grow and multiply within the cells of another living thing,
    15·1 answer
  • You are planning to install Windows 10 on a computer in a dual-boot configuration. The computer already has Windows 8 installed.
    14·2 answers
  • Technician A says that volatility describes how hard it is for gasoline to evaporate. Technician B says that Reid vapor pressure
    8·1 answer
  • Blending two or more colours is called​
    6·1 answer
  • WHO WANTS TO PLAY AMONG US
    15·2 answers
  • Complete the sentence
    6·2 answers
  • Explain how power surges can affect computers and how this problem can be minimised or removed<br>​
    9·1 answer
  • What is the difference between a field and an infoobject? What is the advantage of using infoobjects instead of fields in an ads
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!