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.
Please tag this as homework

To the point: lots of problems here

First, you need to have your main actually call shortHand on each line, and probably print the results.

Second, your shorthand function should iterate over all the characters of the string, right now you are not doing that. You will be passing each character to the isVowel function.