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); } }
Comments
Post a Comment