ParenthesesOnlyIfArgument
Observed

ParenthesesOnlyIfArgument
Incorrect

() are optional for method calls without arguments

Correct

() are mandatory even for method calls without arguments

Correction
Here is what's right.

In Java parentheses are required to distinguish method calls (o.m()) from field accesses (o.f).

When calling any method, even a method without arguments, parentheses are required.

Origin
Where could this misconception come from?

Students may have prior knowledge of languages where parentheses are indeed optional for argument-less method calls.

Symptoms
How do you know your students might have this misconception?

A student may write code like this:

class C {
  int f(int x) { ... }
}

C o = ...;

int result = o.f;

Value
How can you build on this misconception?

At first this misconception may look purely superficial. However, it can be surprisingly deep.

In languages where functions are values, it is essential to understand the difference between accessing the function as a value (f), and invoking a function (f()). With the addition of lambdas and method references to Java, Java now also supports treating functions as values. However, in Java—unlike in other languages with first-class functions—to invoke such functions, one needs to use the traditional method invocation mechanism to call the single method provided by the functional interface that represents the function’s type:

Function<Integer,Integer> f = ...;`
int y = f.apply(x); // instead of f(x) used in other languages

An additional potentially valuable aspect of this misconception is that it might indicate that a student sees methods and fields as something similar. And indeed, in some languages (like JavaScript) objects are seen primarily as a general map from keys to values (sometimes called a “hash”). Some entries in that map can be seen as “methods”, because their values are functions.

Language

Java

Concepts

Expressible In

Related Misconceptions

Other Languages

Literature References

The following papers directly or indirectly provide qualitative or quantitative evidence related to this misconception.

Chiodini et al. 2025

Quantitative systematic research

97 Swiss high school teachers and their students

Python
Artifact

Programming Language Misconceptions studied:
POIA: ParenthesesOnlyIfArgument
15 / 97
Teachers hold misconception
81 / 97
Teachers familiar with misconception
Important: 68
Somewhat Important: 17
Not So Important: 8
Not Important: 2
I'm not sure: 2
Importance (reported by teachers)
Frequently: 33
Multiple Times: 30
At Least Once: 18
Never: 14
I don't know: 2
Prevalence in students (reported by teachers)
Bevilacqua et al. 2024

Qualitative and quantitative systematic research

542 hand-drawn expression trees from 12 exams in 6 university courses

Java
Artifact

Diagram mistakes studied:
ParameterlessWithoutParentheses: A method / constructor with no arguments is represented in the tree with its proper name but without parentheses.
12 / 266
Cases
Altadmri and Brown 2015

Repository mining study (BlueJ Blackbox)

250000+ students across the world

Java
Artifact

Mistakes studied:
J: Forgetting parentheses after a method call
10232 / 250000
Users making mistake
Hristova et al. 2003

Qualitative (survey of instructors and students)

Unknown number of undergraduate students, professors, SIGCSE members

Java

Errors studied:
Syntax10: Forgetting parentheses after a method call
Brown and Altadmri 2017

Quantitative systematic research analyzing 100+ M compilation events and surveying educators perceptions about 18 selected mistakes

900+ students and 76 educators

Java

Errors studied:
(J)parCalSyn: Forgetting parentheses after a method call
43165 / 100000000
Compilation events containing this error