go to previous page   go to home page   go to next page

Answer:

Yes.


A Run of the Program

Here is the output of the program.

C:\CAI\javaLessons\chap75>javac EqualsTester.java

C:\CAI\javaLessons\chap75>java  EqualsTester
"applecart" != "appleCart"

C:\CAI\javaLessons\chap75>

It turns out that "applecart" is not equal to "appleCart". I hope you are not upset.

It would be helpful the copy the program and play with it. Perhaps add user interaction.


QUESTION 22:

Does the stardard Java String class have a method that compares two strings but ignores case?