Input
Output
public class Finalvariable { public static void main(String args[]) { B b= new B(); b.showdata(); } } class B { final int a=5;// final varibale void showdata() { // a=9; It can't change the value of a. It throw compile error. System.out.println("Derived class a value: "+ a); } }