I am trying to look through an array and pick out certain strings - JAVA : So, We have to do complete a task for my AP Computer Science class and I figured out the base of the code but I am stuck on a part. Here is the link to complete the assignment if you would like to try it out.

LINK: http://codingbat.com/prob/p254067

Here is my code so far:

  

    public int numVworthy(String wordsList[]) {
      int count = 0;
      String w = "w";
      String v = "v";
      
      for(int i = 0; i < wordsList.length; i++) {
        if(wordsList[i].contains == v) {
          if(wordsList[i -1].contains != w && wordsList[i + 1].contains != w) {
            count++;
          }
        }
      }
      return count;
    }

Any help on what to do next is appreciated