
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Verification in Java (JVM)
Once the byte code is loaded by the JVM, (with the help of the .class file), the bytecode is checked to see the validity with the help of the verifier. The verifier checks the linking so as to perform operations efficiently. This way, the interpreter performs much efficiently. This process is known as verification.
Example
public class Demo{ private float my_val; float my_function(int my_val){ int balance = my_val; this.my_val += balance; return this.my_val; } public static void main(String[] args){ Demo my_obj = new Demo(); System.out.println("The instance of Demo has been created"); System.out.println(my_obj.my_function(3456)); } }
Output
The instance of Demo has been created 3456.0
A class named Demo contains a float value. Another function named ‘my_function’ adds a given value to the float value. In the main function, an instance of the Demo class is created, and the ‘my_function’ is called on this object. Relevant output is displayed on the console.
- Related Questions & Answers
- Java (JVM) memory model
- Java (JVM) Memory Types
- JVM shutdown hook in Java
- What is JVM, Java virtual machine?
- Explain Java Virtual Machine (JVM) Architecture
- What is Java Virtual Machine (JVM)?
- Java Virtual Machine (JVM) Stack Area
- JVM Stacks
- Difference between JDK, JRE and JVM in Java
- Get the JVM uptime from RuntimeMXBean in Java
- What is Unified JVM Logging in Java 9?
- Verification techniques in testing domain
- Checkbox verification with Cypress
- Where does Array stored in JVM memory in Java?
- How JVM works?
Advertisements