I want to exclude only If ColumnA = 'SA' exclude ColumnB not like '%Prev%' and ColumnB not like '%old%'. If columnA = 'BA' I want to keep them. exp:

> 
> 
> ```
> select columnA
>     from Table
>     where columnA ='SA' and ColumnB not like '%Prev%' and ColumnB not like '%old%'
> 
> ```
> 
>
['https://Stackoverflow.com/questions/67169129', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5661085/']
You are trying to perform Integer operation on a list. 'lengths' is an ArrayList and operation % is non applicable to it. Also, I think you shouldn't use cloning here and just iterate over `list` and check if each element is odd - print it or add to another list if it is.
modify lengths methods

```
 public static void main(String []args){
         ArrayList<String>  
        list = new ArrayList<String>();

        list.add("yoy");
        list.add("lmao");
        list.add("lol");
        list.add("kk");
        list.add("bbb");

        ArrayList<String> lengths = lengths(list);

        System.out.println(lengths.toString());
     }

     public static ArrayList<String> lengths(ArrayList<String> list) {
      ArrayList<String> lengthList = new ArrayList<String>();
      for (String s : list)
            if(s.length() % 2 != 0)
               lengthList.add(s);
        return lengthList;
     }

```