Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 748387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:18:53+00:00 2026-05-14T14:18:53+00:00

What is the difference in the evaluation rule of an operator and a method

  • 0

What is the difference in the evaluation rule of an operator and a method in Java?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:18:54+00:00Added an answer on May 14, 2026 at 2:18 pm

    Femaref’s answer is pretty good; I’d like to expand on it.

    Operators are (usually) hard-wired into the language: Stuff like +, -, * and / are usually directly translated by the compiler into machine language (if that’s the underlying mechanism for that language system) without the need to explicitly call a method in a library. This is how it is/was in C, for instance. If those operators weren’t defined in the language, you’d have to code plus(2,2) instead of 2 + 2.

    Operators defined in the language come with the benefit of built-in priority. * and / usually have higher priority than + and -, so you can write 3 * 3 + 4 * 4 and get 25, not 52 or 84 that you’d get without such priorization or different priorities.

    The line becomes a little grey when operators are recognized by the compiler but still delegated to a library. Complex numbers in FORTRAN may be an example: Often the compiler will not bother to directly compile complex operations into machine code but will generate machine code to call a library.

    Most people think only of the arithmetic operators, like +, - and so forth. But you could also consider square brackets ( [ ] ) an operator for array indexing, for example.

    Some languages let you overload their operators, so you can substitute a call to a method for whatever the operator normally does.

    Most languages don’t let you define your own operators that support the same mechanisms as the built-in ones. Scala is an exception here; you can define a +++ operator if you like and have it hook up to a method you provide. Some people think operator overloading makes code harder to understand, so the jury is still out about whether this is a good idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The difference of InputStream DataInputStream and BufferedInputStream in java?
I wrote an instance method in my model for calculating a time difference between
Could anyone, please, explain what is the difference between the two: Specification for evaluation
I am working on a decision engine / rule evaluation engine. For example: Input:
What is the difference between the evaluation of double and #'double in Clojure/Lisp? 1:2
Is there a difference between lazy loading and lazy evaluation (both of which are
What is the difference between the evaluation of == and Equals in C#? For
Difference between start-pointers and interior-pointers and in what situation we should prefer one over
What difference does it make when I use a const parameter in a procedure?
The difference between Chr and Char when used in converting types is that one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.