I am trying to take input of an array of strings (each string is a question) and my code is as follows:
void read_quest()throws IOException
{
System.out.println("enter the questions(enter null to end input operation)");
for(int i = 0;; i++)
{
question[i]=in.readLine();
if(question[i].equals("\0")==true)
{
n=i-1;
break;
}
}
}
but the loop is never exited i am using bluej as it is for a school project(we are allowed to use only bluej) thanks in advance