final keyword

WAP to use final keyword.

 

class P04FinalKeyword { public static void main() { int a=10; final int b= 15; a= 11; //b=16; it will show errors. //we cannot change the value of variable if we used final keyword System.out.println( " Values are "+a); System.out.println(" Values are " +b); } }





For any desired program, please comment below. We will try our best to make that program available.


Comments

Popular Posts