Java is a strongly typed language, this means that it's case-sensitive and each variable needs to be defined. Furthermore, Java has a set of reserved words. If you misspell a word, depending on the error:
If you import a package and misspell the package reserved word, it won't compile.
If you misspell the main function, it will compile but not run.
If you misspell a function assigned for a variable, it may compile and run but when the program passes through the line of the code, it would throw a logic error.