Why some brackets (specially round brackets) often left empty?

Hello guys, newbie here!

I was watching the “Formatting Numbers” lecture, and half way in, It occurred to me that commands like “NumberFormat.getCurrencyInsert()” and “NumberFormat.getPercentInsert()” are often ended with empty round brackets.

so my question is, what does an empty round bracket translate into by machine logic, and regarding the aforementioned codes, what variable (if any) can you use within their corresponding round brackets?

Thanks dudes!

In a method declaration the empty parentheses tell the compiler that we are declaring a method with an empty parameter list. In a method invocation they tell the compiler that it should invoke the parameterless overload of that method.

2 Likes

Just watched the tutorial on method overloading so I completely understand your explanation. thanks mate, cheers