Source: http://www.imooc.com/code/1176
Common keywords in Java:
Q: So many, can't remember Ah ... -_-||
A: Now you do not need to remember all, mix a familiar, in the course of learning, you will gradually find the feeling and remember them
Yes, almost forget the big thing, the Java keyword is case-sensitive Oh! So void is the keyword, but void is not the ~ ~
Task
Do you understand the keywords in Java? Verify it together!
Public class HelloWorld { publicstatic VoiD main (string[] args) { System.out.println ( "Hello Imooc");} }
After looking at the code in the editor carefully, can you find the error in line 2 and modify it?
-
Prompt information
error:cannot Find Symbol Public Static void Main (string[] args) { ^ symbol: class void class HelloWorld1 Error
Correct code:
Public class HelloWorld { publicstaticvoid main (string[] args) { System.out.println ("Hello Imooc");} }
Web-android Engineer first form -2-1 Java keywords