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
Before radio, many minority musicians were severely limited by the prejudice of the era. true o rfalse
Ipatiy [6.2K]

Answer:

true

Explanation:

false

8 0
3 years ago
Read 2 more answers
Who are the people responsible for maintaining and controlling computer networks within an organization?
erik [133]

Answer:

Network Administrators

Explanation:

Network and computer systems administrators are responsible for the day-to-day operation of these networks. They organize, install, and support an organization's computer systems, including local area networks (LANs), wide area networks (WANs), network segments, intranets, and other data communication systems.

6 0
3 years ago
In both direct flooding attacks and _____ the use of spoofed source addresses results in response packets being scattered across
Natali5045456 [20]

Answer:

SYN spoofing attacks.    

Explanation:

The Spoofing attack is used to access the personal information it is distributed the  viruses through infected links or file .The spoofing attacks has redistributed the traffic and the flow control in the denial-of-service attacks.

The SYN spoofing attacks is used the spoofed source in the result of giving response to packet The Spoofing attack  is distributed  across the Internet also it is detectable

6 0
3 years ago
What is the output of the given code?<br><br> A. Compiler error<br> B. 0505<br> C. Smooth<br> D. 0.0
oksano4ka [1.4K]

Answer:

The answer is A. Compile error

Explanation:

In the class Fabric, fabricID has private access. You can only print out out private variables in the class or function they are assigned in.

ps: sorry if I am wrong, I am kind of new to java

6 0
3 years ago
Match the terms with their definitions.
Sever21 [200]
Phishing is 2
clickjack is 1
malware is 3
single signon is 4

Internet safety tip: Single Sign-On is unsafe. The others are made by hackers with no life and no heart.

5 0
4 years ago
Read 2 more answers
Other questions:
  • This type of connection uses radio waves to connect devices on a network.
    9·2 answers
  • Why should you not perform any personal grooming task while driving?
    5·2 answers
  • Based on current and upcoming gaming technologies, what changes do you expect to see in the next generation of gaming consoles?
    6·1 answer
  • Physical activity such as sports or even a brisk walk can help reduce
    7·2 answers
  • The traditional UNIX scheduler enforces an inverse relationship between priority numbers and priorities: the higher the numbe1~
    6·1 answer
  • Which components can be added to a lightning app on custom object (choose 3 answers)A. Visualforce B. Standard Lightning compone
    6·1 answer
  • How 0x86 processor store 0x12345678 in memory ​
    13·1 answer
  • Which statement is most likely to be true about a computer network?
    12·2 answers
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • Using only AND, OR and inverter gates to implement the above Boolean equation, how many gates are needed
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!