What is wrong with my java code, it won't compile? : <p>Okay so I typed a java code to do a simple function. Every time I enter it won't let me compile. Where is my error in this code?</p>

<pre><code>public int add(int a, int b) {
 int sum;
 sum = a + b;
}
public static void main(String[] args){
 int x = 5;
 double y = 7; 
 int total = add(x,y);
 System.out.println(total);
}
</code></pre>
