I'm learning java now. I have a book which is up to SE6 date. Now there is an exercise that asks me:
Write a method that takes two String arguments and uses all boolean comparisons to compare the two Strings and print the results. In main(); call your method with some different String objects.
When I tried:
public static void compare(String a, String b){
System.out.println(a>b);
}
I got error said > operator is not valid for type String
Now my question is - if the book is out of date and something changed since, or am I misunderstanding something in the task?