Doubt in if/else-if logic
<p>Hi :
I am using the following code </p>

<pre><code>String sample = " : : ";
String[] splitTime = sample.split(":");
if ( splitTime[0].trim().equals("") ||
        splitTime[0].trim().equals(null)) {
      System.out.println("Inside Split 0");
      splitTime[0] = "0";
 } else if (splitTime[1].trim().equals("") ||
        splitTime[1].trim().equals(null)) {
      System.out.println("Inside Split 1");
      splitTime[1] = "0";
 }else if (splitTime[2].trim().equals("") ||
        splitTime[2].trim().equals(null)) {
      System.out.println("Inside Split2");
      splitTime[2] = "0";
 }

 System.out.println("Value 1 :"+splitTime[0]);
 System.out.println("Value 2 :"+splitTime[1]);
 System.out.println("Value 3 :"+splitTime[2]);
</code></pre>

<p>OUTPUT :<br>
Inside Split 0<br>
Value 1 :0<br>
Value 2 :  <br>
Value 3 : <br>
I don know why it is not going into second and third if-else statement. Can anyone help me?</p>
