error while using ternary operartor, :       public static void main(String[] args) {        
      Scanner in = new Scanner(System.in);       
      String s = in.nextLine();         
     String l,b;         
     for(int i=0;i<(s.length()-2);i++)            
      {if(i==0)             
                         {l=s.substring(i,i+3);s.substring(i,i+3).compareTo(s.substring(i+1,i+4))>0?                         
l=s.substring(i,i+3):l=s.substring(i+1,i+4);      // assigned values                      s.substring(i,i+3).compareTo(s.substring(i+1,i+4))<0 ? 
           b=s.substring(i,i+3):b=s.substring(i+1,i+4);             }

                why does it show variable i and b not assigned