Question: I am stuck on this code. 

The code should use the class StringBuilder to build an output string by appending non-vowel characters from its argument in to the result it returns. It needs to identify vowels to be removed using the helper method i created which is public boolean isVowel(char c). 

`public String shorthand(String in)` this is the method I need help with. I have created the stringbuilder but the if condition does not accept isVowel method.

```
import java.io.*;
import java.util.*;

public class Shorthand
{    

    public boolean isVowel(char c)
   {

       if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A'|| c == 'E'||c == 'I'|| c == 'O'|| c == 'U')
       {
           return true;
       }
       else
       {
           return false;
       }
   }

    //TODO Complete the shorthand method
    public String shorthand(String in) //this is the code I need help with
    {
      StringBuilder vowel = new StringBuilder();

      if (isVowel() == false)
      { 
        vowel.append(in); 
       } 
          return vowel.toString(); 
    }

    //TODO Complete the run method
    public void run() throws IOException
    {
       String yourLine; 
       Scanner sc = new Scanner(System.in); 
       yourLine = sc.nextLine(); 
       while(!yourLine.equals("*"));
       {
            System.out.println("Enter your line of text");
       }
       yourLine = sc.nextLine(); 
    }
}

```

Answer: 
You didn't pass the `char c` argument of isVowel()

Try this:

```
public String shorthand(String in) { 
        StringBuilder vowel = new StringBuilder();

        for (char c : in.toCharArray()) {
            if (!isVowel(c)) {
                vowel.append(c);
            }
        }

        return vowel.toString();
}

```

EDIT: Your `run()` method seems to be a bit weird... 

Maybe the following is what you wanted?

```
public void run() throws IOException
{
    String yourLine;
    Scanner sc = new Scanner(System.in);
    while (!sc.nextLine().equals("*")) {
        System.out.println("Enter your line of text");
    }
}

```

On a side note, it doesn't even call the `shorthand()` method.
You need to pass a char value to the `isVowel()` method. Try the following:

```
public String shorthand(String in) 
{
  StringBuilder vowel = new StringBuilder();

  for (int i=0; i < in.length(); i++)
  {
      if (isVowel(in.charAt(i)) == false)
      { 
        vowel.append(in.charAt(i)); 
      }
  } 
  return vowel.toString(); 
}

```