Write a recursive method to print a string backwards.

What will be an ideal response?


```
public static void writeBackwards(String s, int size)
{
if(size >0)
{
System.out.print(s.substring(size-1, size));
writeBackwards(s, size-1);
}
}

```

Computer Science & Information Technology

You might also like to view...

We saw the CDialog class as an example of a graphical user interface control that is designed to be used as a parent/base class. Can you find two more GUI classes designed with the same intention? (Note, many GUI controls are used as is, such as a slider or a button. This question is asking for a control that you modify for your program’s use.)

What will be an ideal response?

Computer Science & Information Technology

The autosave option automatically makes copies of files as you are working on them.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

(Removing the continue Statement) Describe in general how you’d remove any continue statement from a loop in a program and replace it with some structured equivalent. Use the tech- nique you developed here to remove the continue statement from the program of 4.12.

What will be an ideal response?

Computer Science & Information Technology

When you install an ISDN terminal adapter (TA), what special number provided by the telephone company must be configured along with the other ISDN telephone number you want to call?

A. Default gateway B. Service Profile ID (SPID) C. DS0 D. Basic Service Set Identifier (BSID)

Computer Science & Information Technology