java - Why String.contains with empty String returns true? -


when work code found this,

 string mystring1="foo";  string mystring2="";           if(mystring1.contains(mystring2)){               system.out.println("am here");           }           else{               system.out.println("am not here");           } 

it print am here why? please 1 me find this.

it same principle empty set subset of every possible set.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -