This is a sample code snippet depicting the usage of MBean in Java