Apologize for the nob question. I tried unsuccessfully to go through other similar questions but most of them were way more complex.
The problem I have is within the while loop. Even though I write "test" which is supose to be the end of the loop statement, stucks on it. Does anyone know what I'm doing wrong? Thanks in advance!
public static void main(String[] args) {
Metodos consulta = new Metodos();
int x;
String a=null, b=null;
Scanner n;
while(true){
while(a!="test")
{
System.out.println("Escriba la unidad de persistencia con la que quiere trabajar/n");
n = new Scanner(System.in);
a = n.nextLine ();
consulta.nombrePersistencia(a);
System.out.println("The value of a is: " +a);
}
Note: The command shows the value of a is test. This even cross me more!.