0

I was going through the java Method.class (Decompiled) and I found something that caught my eye.

@Override
public boolean isSynthetic() {
    return super.isSynthetic();
}

"Synthetic". What does that mean?

Is it usable in code?

.

And since I found this in the Method class, I was wondering, is it that an entire method could be "synthetic", or is it that it contains something synthetic?

Thanks in advance.

.

not a copy of What is the meaning of “static synthetic”?

Community
  • 1
  • 1
John S.
  • 626
  • 1
  • 4
  • 16

1 Answers1

1

Any constructs introduced by the compiler that do not have a corresponding construct in the source code must be marked as synthetic, except for default constructors and the class initialization method.

http://www.javaworld.com/article/2073578/java-s-synthetic-methods.html

Mo1989
  • 2,374
  • 1
  • 15
  • 17