From FANG
Defining a method outside of the class body is an error.
The problem is with methodB on lines 12-15.
|
01 /**
02 * All about my classclass is a group of fields and methods used for making objects here.
03 * @authorthis is the Javadoc tag for documenting who created the source code Jam Jenkins
04 */
05 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects MethodDefinitionError
06 {open braces start code blocks and must be matched with a close brace
07 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value methodA()
08 {open braces start code blocks and must be matched with a close brace
09
10 }close braces end code blocks and must match an earlier open brace
11 }close braces end code blocks and must match an earlier open brace
12 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value methodB()
13 {open braces start code blocks and must be matched with a close brace
14
15 }close braces end code blocks and must match an earlier open brace
|
Compiler Errors:
----------
1. ERROR in MethodDefinitionError.java (at line 11)
}
^
Syntax error on token "}", delete this token
----------
2. ERROR in MethodDefinitionError.java (at line 15)
}
^
Syntax error, insert "}" to complete ClassBody
----------
2 problems (2 errors)
Download/View MethodDefinitionError.java