Results 1 to 4 of 4

Thread: define constants

  1. #1

    Thread Starter
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    How do I define a constant in Java?
    Mark
    -------------------

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Posts
    69

    defining constants

    Hey mark,

    defining constants....
    usually it must have static and final keywords and the variable are usually in all upper case. For example:

    public static final double PI=3.141562 //close enough

    Manoj

  3. #3

    Thread Starter
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Thanks sweetsupra

    Its a bit long-winded isn't it!
    Mark
    -------------------

  4. #4
    Lively Member
    Join Date
    Jan 2000
    Posts
    69

    longwinded

    mark:


    java is long winded


    Manoj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width