Ok so this is my code so far I really need help to make it quit after I type in quit and also for the program to not end after typing in one string. Any help or links to some help would be appreciated I am a very novice programmer.
import java.util.Scanner;
import java.io.*;
public class reverse
{
public static void main(String [] args)
{
String input = null;
Scanner keyboard = new Scanner(System.in);
System.out.print("Please enter a string for reversal or type QUIT to exit: ");
input = keyboard.nextLine();
if(input.equals("quit"))
{
//close the program
}
Reverser(input, (input.length() - 1));
System.exit(0);
}
public static void Reverser(String str, int size)
{
if(size>=0)
{
System.out.print(str.charAt(size));
Reverser(str,size-1);
}
}
}