Sunday, October 5, 2008

Creating Constants

Constants-A constant is a meaningful name that takes the place of a number or string and never changes.
The difference between variable and constant is we can change the variable value in run time
but for constants its not possible.

Creating constants

const str="RAJAPUTRA"

here str is a constant and the value will never change.

We have public and Private constants. By default all are public. If you want specify the type then

Public const str="RAJAPUTRA"
or
Private const str="RAJAPUTRA"

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.