Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeLanguages
Java
jls21
Method Declarations

Java Language Specification, Version Java SE 21 Edition
8.4. Method Declarations

Read this Section of the Authoritative Specification

https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4

5 Documented Misconceptions

Misconception
MethodWithoutReturnType
A method declaration does not need to include a return type
Misconception
MethodsWithoutClass
Methods can be defined outside a class
Misconception
RecursiveActivationsShareFrame
Recursive calls of a method share a stack frame
Misconception
RecursiveMethodImpliesRecursiveType
A class with a recursive method represents part of a recursive data structure
Misconception
RecursiveMethodNeedsIfElse
A recursive method needs to contain an if-else statement

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors