I'm starting a new program, and for some reason I get the following errors when I try to compile it:

```
3D.java:4: error: <identifier> expected
public class 3D {
            ^
3D.java:5: error: illegal start of expression
    public static void main(String[] args){
    ^
3D.java:5: error: illegal start of expression
    public static void main(String[] args){
           ^
3D.java:5: error: ';' expected
    public static void main(String[] args){
                 ^
3D.java:5: error: '.class' expected
    public static void main(String[] args){
                                     ^
3D.java:5: error: ';' expected
    public static void main(String[] args){
                                         ^
3D.java:20: error: reached end of file while parsing
}
 ^
7 errors

```

Here is my code: 

```
import java.awt.Canvas;
import java.swing.JFrame;

public class 3D {
    public static void main(String[] args){
    int height = 400;
    int width = 600;
    String title = "3D Game";

    JFrame f = new JFrame();
    f.setSize(width, height);
    f.setVisible(true);
    f.setTitle(title);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setLocationRelativeTo(null);
    }

}

```

I haven't really done much, and I'm not sure where these errors are coming from seeing as I'm not trying to declare a method within a method or anything like that. So, help would be appreciated.