0

I am assuming that the operators must be defined somewhere in some sort of java file in the language, where could I find the implementation or definitions of the operators in the java language?

2 Answers2

5

They're not defined in Java, because otherwise you have an infinite regress. They're defined in the Java Language Specification (specifically section 3.12).

chrylis -cautiouslyoptimistic-
  • 75,269
  • 21
  • 115
  • 152
1

The definition of the operators is in the Java Language Specification, in Chapter 15. Expressions, starting with sub-chapter 15.14.

The implementation of the operators is partly in the Java Compiler, which converts the operators to bytecode, and in the JVM, which executes the bytecode. Neither are written in Java, so your assumption about that is wrong.

See also:
Where is the source code for the java compiler?
Is JVM open source code?

Andreas
  • 154,647
  • 11
  • 152
  • 247