There are 2 ways to say if its correct or not.

1. Syntactically
2. Semantically

For testing point 1 you should allow the compiler to say if its compiling.

For Semantically correction we need to know what you are trying to do as well.