Bifalgorithm post · Computer science one · Passing By Reference

Why is the Utils.methodName() syntax used for methods?

Why is the Utils.methodName() syntax used for methods? (Computer science one · Passing By Reference) — "The Utils.methodName() syntax is used because the metho…

Ideas in this flowchart

  • Invocation of static methods through class names
  • Utils.methodName() is the syntax used to invoke a method.
  • The methods are static.
  • Static methods belong to their class.
  • Static methods must be invoked through the class's name.
  • The same syntax was previously seen with standard JDK library functions.
  • System. is an example of this syntax.
  • Math. is another example of this syntax.
Feed/

Why is the Utils.methodName() syntax used for methods?

No cover

Channel

Computer science one

1 page

"The Utils.methodName() syntax is used because the methods are static –they belong to the class and so must be invoked through the class using the class’s name. We’ve previously seen this syntax when using System. or Math. with the standard JDK library functions."

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.