The following method header definition will result in a syntax error: public void aMethod( );

The following method header definition will result in a syntax error: public void aMethod( );


Answer: True. Explanation: The reason for the syntax error is because it ends with a “;” symbol. It instead needs to be followed by { } with 0 or more instructions inside of the brackets. An abstract method will end with a “;” but this header does not define an abstract method.


Java

Learn More Multiple Choice Question :