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
The need to strike a<br>- among work, life, family, and other responsibilities is<br>universal.​
Dmitriy789 [7]
The need to strike is purposely to create unity and equal rights for what a group might feel is unfair .
4 0
3 years ago
When seeking information on the Internet about a variety of subjects, the most
liq [111]

Answer:

wikipedia

Explanation:

they have like almost everything.

6 0
4 years ago
Read 2 more answers
What should you use as the argument for the goto() command?
Soloha48 [4]
D. The X and Y coordinates of a point 

goto(21,60)

will make the turtle go to that specific location.
7 0
3 years ago
True or False? Most operating systems allow the user to specify a set of paths that are searched in a specific order to help res
inessss [21]

Answer:

The correct answer to the following question will be "True".

Explanation:

The "kernel" as shown at the core of your OS would be the central machine program. The program facilitates the essential functions of a computer processor, including coordinating activities, executing programs, and managing devices. This allows users to define a series of directions to try to resolve the connections to running program files in an order of preference.

So, the given statement is true.

4 0
4 years ago
What does the third argument (3) refer to in the following formula: VLOOKUP(10005, A1:C6, 3, FALSE)
zzz [600]

Answer:

The answer is "number of the column containing the return value".

Explanation:

In Excel, the "VLOOKUP" method is used to perform the vertical search by looking for both the value during the user table and retrieving the number of the index number location in the same row. It is a built-in function, which is classified as a Lookup or Reference worksheet function, and the following function can be defined as follows:

  • In the 1st parameter, it is used to watch the value for the match.  
  • In the 2nd parameter, it is used to search the table.
  • In the 3rd parameter, it is used as the column number representing the return value.  
  • In the 4th parameter, it is used to return only if the same match is found.
5 0
3 years ago
Other questions:
  • Write an interactive Python calculator program. The program should allow the user to type a mathematical expression, and then pr
    13·1 answer
  • Which is a function of network media?
    14·2 answers
  • Which of the following is used to encrypt web application data?
    11·1 answer
  • for what reason do some security professionals consider insiders more dangerous than outside intruders?
    8·1 answer
  • Yolanda lost her left foot during her military service, but she has been issued a prosthetic that enables her to walk normally,
    13·1 answer
  • Which of the following is NOT considered a step in the problem solving process. A Try B Discover C Prepare D Define
    12·1 answer
  • (Financial application: compound value) Suppose you save $100 each month into a savings account with the annual interest rate 5%
    8·1 answer
  • Which behavior of the application should the user expect? A user profile has login hour restrictions set to Monday through Frida
    12·1 answer
  • If you do not use the mini toolbar, it remains on the screen. _______________​ Group of answer choices True False
    8·1 answer
  • A major public university graduates approximately 10,000 students per year, and its development office has decided to build a We
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!