Home Is String sequence of characters in Java?
Reply: 0

Is String sequence of characters in Java?

user300
1#
user300 Published in June 24, 2018, 3:09 am
String s1 = "a";
System.out.println(s1.equals('a'));

Output:

False

Can anyone please explain me why is it coming false even though the string s1 has only one character 'a'.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.411605 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO