string partial match contain method
<p>the following method print s2 and i want to print the else portion in this situation also please share your answer</p>

<pre><code>public static void main(String args[]) {
    String s1 = " ";
    String s2 = "this is wonderful method i am using";
    if (s1!="" &amp;&amp; s2.contains(s1))
        System.out.println(s2);
    else
        System.out.println("no match found");
  }
</code></pre>
