Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to correct my code or how to write it in java? Homework: String Reverse Let's get some more practice working with Java Strings: an

image text in transcribed
image text in transcribed
how to correct my code or how to write it in java?
Homework: String Reverse Let's get some more practice working with Java Strings: an incredibly useful data type for working with text. Write a function called reverse. It should accept a single String argument and return that String, reversed! There are several ways to approach this problem, and you may want to look into either the charAtE or tocharArray String methods. A You have until 11:59PM Central Time on 2021-02-10 to complete this problem. WORKING PREVIOUS 2 3 4 1 String reverse(String 0) { char[] newo - o. tocharArray(); String b = "; for (int i = o. length - 1; i >= 0; i--) { b+= o[1]; } return o; 8) 9 5 6 7 10 Question.java:4: error: cannot find symbol for (int i = o. length - 1; i >= 0; i--) { symbol: variable length location: variable o of type java.lang.String Question.java:5: error: array required, but java.lang.String found b += o[i]; 2 errors

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions