Java-viva and questionaire
Java-viva and questionaire
(5 marks)
JVM (Java Virtual Machine) is a software that runs Java bytecode on a
computer. It provides a platform-independent environment for running Java
programs. The JVM interprets the bytecode and executes the instructions,
providing memory management, security, and other features. The JVM also
provides a sandboxed environment for running Java programs, which ensures
that the programs cannot access sensitive data or cause harm to the system.
# 14. What is the difference between this keyword and super keyword? (5
marks)
The this keyword refers to the current object, while the super keyword refers to
the parent class. The this keyword is used to access the fields and methods of
the current object, while the super keyword is used to access the fields and
methods of the parent class. The super keyword is often used in subclasses to
override the methods of the parent class.