“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
We always need to remember that we are using interfaces of JAVA. We need to import required library except "lang" because it is default imported library.
It's a principle thing and IDE is also shows error message before compile. Hope so this information we be beneficial for you future.