Lesson 64 - Strings - Part 6 - equals() equalsIgnoreCase() compareTo () methods of String class

Опубликовано: 01 Январь 1970
на канале: JavaJourneyWithMadhavi
132
4

In this video, usage of == sign, greater than and less than operators in Strings is discussed with the help of four programs.

Link to the Book - Essentials of Computer Applications:

https://www.amazon.in/Essentials-Comp...

Link to Lesson 46 Usage of compareTo() method in Binary search:
   • Lesson 46 Arrays Part 7 - Binary Search  o...  

Link to Lesson 48 Usage of compareTo() method in Bubble Sort:
   • Lesson 48 Arrays Part 9   Bubble Sort on S...  

Link to Lesson 50 Usage of compareTo() method in Selection Sort:
   • Lesson 50 Arrays Part 11  Selection Sort o...  

Practice Exercise Lesson 64: equals (), equalsIgnoreCase(), compareTo() methods of String class:

1. Read gmail id from a user and check if it is [email protected] or not.
2. Read a name and find its equivalent to “SHALINI” or not. (case can be ignored)
3. Guess output. System.out.println(“bag”.equals(“bag”) );
4. Read two strings and display whether they are equal or not using compareTo() method.
5. Read two strings and display smaller string using compareTo () method.