Is it possible to get source code of abstract, extends, implements keywords? I want to see how abstract or extends work in Java?
Asked
Active
Viewed 92 times
1
-
Start by learning about compiler techniques and understand how keywords are interpreted by java compiler to generate the relevant bytecodes aka class files to achieve the idea of `abstract`, `extends` and so on. – Samuel Kok Oct 13 '16 at 03:20
-
@SamuelKok From where can i do that? Learn about compiler techniques, how keywords work. Any resources or books? – Nick Silicon Oct 13 '16 at 04:17
1 Answers
0
- 'implements' is used when a class incorporates methods of an interface.
- 'extends' is used by a "subclass" to be able to access the methods and protected variables of its "superclass".
- 'abstract' method is declared without implementation. An abstract method can only be declared in an abstract method. Any subclasses of an abstract class must implement all abstract methods.
Hope this helps, there's also plenty of sample code online!
-
Yea, that's correct. I want to see the source code of abstract keyword. Like we are having source code of Object, Runnable, etc. inside src.zip. – Nick Silicon Oct 13 '16 at 04:18