Sentinel Value to Close FileWriter (Java)?

To check for String equality, use . Equals while (!input. Equals("stopnow")) { outputFile.

Println(input); // print input to the file System.out. Println("Please enter the next word or stopnow to end"); //Prompt user for a word input = kb.nextLine(); // assign input as the word } What you are currently doing is comparing references.

Everyone must be out to lunch if no ones answered this but me by now... – Amir Afghani Oct 19 '10 at 20:27 so, the! = operator is only for int's? – Woops4000 Oct 19 '10 at 20:28 I was about to answer it, but then a coworker stopped by to ask me a question.

Stupid work getting in the way of SO. – Justin 'jjnguy' Nelson Oct 19 '10 at 20:29 @Woops,! = is only for primitive types like int, double, char and so on.

– Justin 'jjnguy' Nelson Oct 19 '10 at 20:29.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions