Documente Academic
Documente Profesional
Documente Cultură
Functions In Java
With Examples
Recommended by 202 users
Java String
equalsIgnoreCase(): This method
compares two string on the basis of
content but it does not check the case
like equals() method. In this method,
if the characters match, it returns true
else false. For example:
1
public class EqualsIgnoreCaseExample{
2public static void main(String args[]){
3String s1="hello";
4String s2="HELLO";
5String s3="hi";
6System.out.println(s1.equalsIgnoreCase(s2)); // returns true
System.out.println(s1.equalsIgnoreCase(s3)); // returns false
7}}
8
Share on
PREVIOUS
NEXT
Related Posts
What Is Java? – A Beginner’s Guide to Java and Its
Evolution
17K
Java Tutorial For Beginners – Java Programming
Made Easy!
25.1K
Object Oriented Programming – Java OOPs
Concepts With Examples
32.5K
Comments
0 Comments
Related Blogs