I just heard of these new words in java - Synthetic and Bridge methods. I have searched for them but there is not much information on internet. Can some one elaborate on what bridge or synthetic methods are in java?
Asked
Active
Viewed 61 times
0
-
These are methods from the jvm for generic handling. – Murat Karagöz Sep 04 '17 at 11:26
-
They are methods that the compiler must add (invisibly) to compile a functioning program. Besides the link and link-in-link, there is: a private static inner class is compiled to a separate .class. If it has a (private) field that can be used in the surrounding class. That is done by generating getters and setters instead. I could be entirely wrong, but synthetic/bridge is not a limited concept specified in the java reference. – Joop Eggen Sep 04 '17 at 11:41