View RSS Feed

My Java Tips

  1. Using static and final attributes An example

    by , 11-21-2011 at 04:47 PM (My Java Tips)
    In this post, I will present an example which used static and final keywords with attributes in meaningful way. I hope after going through this, you will develop good understanding of these.


    As may know, that we may access static member of class without using any object of that class. Final field/attribute means that you cannot change its value. If you try to change the value of final attribute, you will get an error some this like this:


    Exception in thread ...