I have a very basic java question. I have a if loop checking a condition if its true, then it calls a methodA (string test) , now this methodA returns ouput string "test".so i need to keep calling this methodA, until it keeps stops returning output string contains "test".
if (sample.contains("test")
{
output = callmethodA(sample)
system.out.println("return as test"+output="**test** is available here")
}
here if output contains text as "test". i need to call this method again methodA(sample) until the output doesnt contain text as "test"
how to achieve this in java? please advise. Thanks.
I have a very basic java question. I have a if loop checking a condition if its true, then it calls a methodA (string test) , now this methodA returns ouput string "test".so i need to keep calling this methodA, until it keeps stops returning output string contains "test".
Aucun commentaire:
Enregistrer un commentaire