mohanjava5
stranger
Reged: 08/03/08
Posts: 1
|
|
I''m very much new to java,learning fundamentals of it. pls. clarify my doubt. THE FOLLOWING CODE COMPILES PERFECTLY: Code:
--------------------------------------------- class abc { double a { System.out.println("hello") } } --------------------------------------------- BUT THE SAME FOLLOWING CODE GIVES COMPILATION ERROR: --------------------------------------------- class abc { double a System.out.println("Hello") } ---------------------------------------------
|
hiwa
Carpal Tunnel
Reged: 06/21/03
Posts: 7704
Loc: Japan
|
|
Read and try this before writing anything. http://java.sun.com/docs/books/tutorial/getStarted/index.html
-------------------- *stop cruelty* Annual number of euthanized cats&dogs: US 5M, JP 500K.*for our better karma*
|
Jeroen
veteran
Reged: 07/07/03
Posts: 1490
Loc: The Netherlands
|
|
And one more advice: read the error message of the compiler carefully. It might be cryptic at first, but it informs you what the error was that prevented a successful compilation. When posting questions here concerning a compilation error, pleas incorporate the error message.
-------------------- With the light in our eyes, it's hard to see.
|