IT Community - Software Programming, Web Development and Technical Support

Difference between static and final in java

This is a discussion on Difference between static and final in java within the Java Programming forums, part of the Software Development category; Anybody Send the answer to Difference between static and final in java...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-09-2007, 04:12 AM
leoraja8 leoraja8 is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 194
leoraja8 is on a distinguished road
Default Difference between static and final in java

Anybody Send the answer to Difference between static and final in java
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-10-2007, 09:08 AM
jeyaprakash.c jeyaprakash.c is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 228
jeyaprakash.c is on a distinguished road
Arrow Re: Difference between static and final in java

Both are modifiers to use indicate class members and constant members respectively. Note that a constant can be either a class (static) or an instance member.

static:
If a field is declared static, there exists exactly one incarnation of the field, no matter how many instances (possibly zero) of the class may eventually be created.
A static field, sometimes called a class variable,
A field that is not declared static (sometimes called a non-static field) is called an instance variable.

final:
the keyword final use to define constants of various primitive types
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-17-2007, 05:49 AM
krishnakumar krishnakumar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 206
krishnakumar is on a distinguished road
Default Re: Difference between static and final in java

Hi,
Java and C# are based on OOPS concepts.. I think that static and final keyword is same in C# also.. Is there any variations and any difference in it rather than that above mentioned points in C#...
__________________
Krishnakumar.S
Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily

Last edited by krishnakumar : 08-17-2007 at 05:53 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between enumeration and iterator in java? kingmaker Java Programming 3 08-08-2007 03:53 AM
Difference between static and final in java leoraja8 Java Programming 2 07-20-2007 06:46 AM
Static Global Variable and Static Local Variable vigneshgets C and C++ Programming 1 05-30-2007 11:50 AM
difference between a static and a non-static inner class vigneshgets Java Programming 1 05-23-2007 11:02 PM
Java Static swoosh Java Programming 3 05-08-2007 04:36 AM


All times are GMT -7. The time now is 10:56 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0