Errors with missing return statement
<p>Every time i try to compile my code i get a error about a missing return statement. Any ideas about whats wrong with my code?</p>

<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
So i fixed a couple of things, but now im getting an error where my variable 'result' might not have been initialized, any suggestions?</p>

<pre><code>    import javax.swing.JOptionPane;
    import java.io.*;
    public class facts
    {
      public static void main(String[]args)
    {

    String input;
    int x;
    char y,prime,perfect;
            do{
        input = JOptionPane.showInputDialog("Enter an integer");
        x = Integer.parseInt(input);
        if(x%2==0)
                System.out.println("The integer is even - it is evenly divisible by 2");
            else
                System.out.println("The integer is not even - it is not evenly divisible by 2");
            prime = isPrime(x);     
            if(prime == 't')
                System.out.println("The integer is a prime number");
            else
                System.out.println("The integer is not a prime number");
            perfect = isPerfect(x);
            if(perfect == 't')
                System.out.println("The integer is a perfect number");
            else
                System.out.println("The integer is not a perfect number");

        input = JOptionPane.showInputDialog("Enter Y for another number, anything else to quit");
        y = input.charAt(0);
        }while(y=='Y');
            System.out.println("Good Bye");

            System.exit(0);
}            
    public static char isPrime(int x)
    {
        for(int y=2;y&lt;x;y++)
        {
            if(x%y==0)
                return 't';
            else 
                return 'f';
        }
    }
    public static char isPerfect(int x)


 public static int triAng(int x)
{
    int result,z,y = 1;
    while(y&lt;=x)
    {
        z=y*(y+1)/2;
        y++;
        System.out.println(z);
        result = z;
    }
    return result;
}
</code></pre>
