Okay, so i need help getting a value from a variable in one class's method. I want to use that data in another Class's method. Heres what i mean...
public class RoomType{
public String N(String[] args){
Scanner scan = new Scanner(System.in);
String opt = "";
int x=1;
do{
opt = scan.nextLine();
if(opt.equalsIgnoreCase("n")){
x=2;
}
else{
System.out.println("Please select a valid direction");
}
}while(x==1);
return (opt);
}
and i want the string "opt" to come up in my "Map" Class in one of the methods.
any help would be greatly appreciated.
thanks
Jesse