hi, this is a program where you type a name of a class and it gives a brief description, what i want to do is after it gives the description of a class it goes back to the beginning of the script and asks you to enter another one. How can i do that? thanks :)
import java.util.Scanner;
public class WoW
{
public static void main(String[] args)
{
String classname;
Scanner inputDevice = new Scanner(System.in);
System.out.println("Welcome");
System.out.println("Please enter a WoW class");
classname = inputDevice.nextLine();
if(classname.equalsIgnoreCase("rogue"))
{
System.out.println("A rogue uses stealth and daggers to destroy it's opponent.");
}
else if(classname.equalsIgnoreCase("hunter"))
{
System.out.println("A hunter can tame beasts and is a master with a bow.");
}
else if(classname.equalsIgnoreCase("warrior"))
{
System.out.println("A warrior is everyones friend, they focus all enemy damage on themselves.");
}
else if(classname.equalsIgnoreCase("warlock"))
{
System.out.println("A warlock calls upon dark magic to cause pain and fear in it's targets.");
}
else if(classname.equalsIgnoreCase("druid"))
{
System.out.println("A druid is at one with nature and can transform into many animals.");
}
else if(classname.equalsIgnoreCase("paladin"))
{
System.out.println("A paladin calls upon the light to heal his allies and smite his foes.");
}
else if(classname.equalsIgnoreCase("mage"))
{
System.out.println("A mage is a master of three schools of magic, arcane, fire, and frost.");
}
else if(classname.equalsIgnoreCase("shaman"))
{
System.out.println("A shaman is a versatile being, deadly with melee and spells.");
}
else if(classname.equalsIgnoreCase("priest"))
{
System.out.println("A priest calls upon the light as a paladin but is more gifted in Holy Magic.");
}
else
{
System.out.println("Invalid Class Entry");
System.out.println("Program terminated.");
}
}
}