How To Implement Final Class In Java
Rate this article
0 out of 5
In this tutorial we will show you how to implement final class in java. After viewing the video tutorial, download the source code and try to modify the code so as to get a feel of what is learned in this video tutorial.


Source Code
FinalDemo.java

import java.io.*;
final class A
  {
    int x;
    A(int m)
      {
       x=m;
      }
   }
class B extends A
  {
   int y;
   B(int a,int b)
    {
     super(a);
     y=b;
    }
void display()
 {
  System.out.println(" Implementation of display method in B "+x+" "+y);
 }
 }
class FinalDemo
 {
  public static void main(String args[])
   {
    B b=new B(5,10);
    b.display();
   }
  }


Source Code

Joined Date : 04/02/2013
Articles
Posted
27
Messages
Posted
0


Click Here to See Full Profile
   
Author
Messages
Posted:
Post Your Comments
Name (Max 50 Chars)
Comments

 
TekTipsDownload
GateExam
Academic Projects
TekTipsExperts
Android