String ntext;
ntext = something;
String currentLine;
currentLine = something;
while(ntext.compareTo(currentLine) != 0){
//some condition
}
Here i want to know what that compareto actually do. One more questin what we can use to compare two objects?