MethodDefinitionError

From FANG

Jump to: navigation, search

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 class here.
03  @author Jam Jenkins
04  */
05 public class MethodDefinitionError
06 {
07   public void methodA()
08   {
09 
10   }
11 }
12   public void methodB()
13   {
14 
15   }

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




Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter

Games
Games