Results 1 to 4 of 4
  1. #1
    pm_4u is offline Member
    Join Date
    May 2008
    Posts
    1
    Rep Power
    0

    Default Constructor with final parameters

    here is a constructor with three parameters. Please can anyone tell me what this final will have affect on the parametes


    Triangle (final Double sideA, final Double sideB, final Double sideC)

    Thanks a lot in advance

  2. #2
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    You can't change the value of those final parameters...(Obviously)
    But you can still use them as constants...

    Have you test it?
    Last edited by sukatoa; 05-15-2008 at 08:06 PM.
    freedom exists in the world of ideas

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    It doesn't matter in s constructor or not. Only thing you have to keep in mind is, can't change the original value of it. As sukatoa says, you can use it while keep as a constant.

  4. #4
    danielstoner's Avatar
    danielstoner is offline Senior Member
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    191
    Rep Power
    7

    Default

    It is also a requirement if you want to use those parameters in local inner classes. Check it out here: http://littletutorials.com/2008/03/0...inner-classes/
    Daniel @ [www.littletutorials.com]
    Language is froth on the surface of thought

Similar Threads

  1. Replies: 0
    Last Post: 04-23-2008, 08:14 PM
  2. NULL Value Of parameters
    By riders in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-14-2008, 02:29 PM
  3. Replies: 0
    Last Post: 12-19-2007, 09:10 AM
  4. Replies: 0
    Last Post: 12-19-2007, 09:01 AM
  5. get parameters in jsp
    By cecily in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-05-2007, 04:29 AM

Posting Permissions

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