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
padilas [110]
4 years ago
6

Write a "for loop" that displays a string in the reverse order (DO NOT use the reverse method) 3.

Computers and Technology
1 answer:
elena55 [62]4 years ago
5 0

Following are the code in java to reverse any string without using reverse function.

import java.util.*; // import package

class Main // class

{

public static void main(String args[])  // main class in java

{

String s, r = "";  // string variable

Scanner out = new Scanner(System.in);  // scanner classes to take input

System.out.println("Enter a string to reverse");

s = out.nextLine();  // input string

int l1 = s.length();  // finding length of string

l1=l1-1;

for ( int i = l1 ; i >= 0 ; i-- )  // for loop to reverse any string

{

r = r + s.charAt(i);

}

System.out.println(" The Reverse String is: "+r);  // print reverse string

  }

}

Explanation:

firstly we input any string ,finding the length of that string then after that iterating over the loop by using for loop and last display that reverse string

output

Enter a string to reverse

san ran

The Reverse String is: nar nas

You might be interested in
Help me this questions I will Brainly the one who correct them all .
Eddi Din [679]
Nice question will answer wait
7 0
4 years ago
What is the ribbon used for in word
vitfil [10]

Answer:

the ribbon is a set of toolbar at a top of window in office program designed to help you quickly find a commans that you need to complete a task

Explanation:

what is the ribbon in word

6 0
3 years ago
What service uses a private cloud in conjunction with a web browser or downloaded client software to access desktop software?
dmitriy555 [2]

Answer:

The answer is Remote desktop services.

Explanation:

What service uses a private cloud in conjunction with a web browser or downloaded client software to access desktop software?

The answer is Remote desktop services.

Desktop virtualization is a software technology that separates the desktop environment and associated application software from the physical client device that is used to access it.

Desktop virtualization can be used in conjunction with application virtualization and user profile management systems, now termed "user virtualization", to provide a comprehensive desktop environment management system. In this mode, all the components of the desktop are virtualized, which allows for a highly flexible and much more secure desktop delivery model. In addition, this approach supports a more complete desktop disaster recovery strategy as all components are essentially saved in the data center and backed up through traditional redundant maintenance systems.

6 0
3 years ago
Does anyone know how to remove specific columns of data sets in R studio?
timofeeve [1]

Answer:The most easiest way to drop columns is by using subset() function.

Explanation:

In the code below, we are telling R to drop variables x and z. The '-' sign indicates dropping variables. Make sure the variable names would NOT be specified in quotes when using subset() function.

5 0
3 years ago
You can use this type of program to create a new raster image
butalik [34]

Answer:

yes

Explanation:

8 0
3 years ago
Other questions:
  • Which of the following documents specifies the uptime guarantee of a web server?A. Due processB. Due diligenceC. Scope of workD.
    7·1 answer
  • Assume that aList is a valid ArrayList containing the following:
    8·1 answer
  • Orphan record example?
    8·1 answer
  • Write an expression to print each price in stock_prices. Sample output with inputs: 34.62 76.30 85.05
    9·1 answer
  • Brad is joining a big website design firm. He is worried that he may not be able to adapt to the company culture. What can he do
    15·1 answer
  • ​open-source software is​ ________.
    11·1 answer
  • Given a Scanner reference variable named input that has been associated with an input source consisting of a sequence of lines,
    13·1 answer
  • Write some positive and negative impacts of computer in our daily life​
    5·1 answer
  • What is a wiki website?
    11·1 answer
  • HELP ME PLEASE
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!