Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strings

 
Karu Raj
Ranch Hand
Posts: 481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It prints True

what is the line at /////////////ABC does ???

if( "String".endsWith(""))///////////////ABC
System.out.println("True");
else
System.out.println("False");
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The empty String ("") can be found anywhere within a String...

(Consider that in mathematics, for any set S, the empty set is a subset of S.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic