48 Program to demonstrate Final Keyword in Java

Code:

// Final Keyword
class FinalDemo
{
final int a = 100;

public static void main( String args[] )
{

FinalDemo f = new FinalDemo();

System.out.println(" A: "+f.a);

}
}


Output:


Previous
Next Post »