Results 1 to 3 of 3
  1. #1
    chandu_g_g is offline Member
    Join Date
    Feb 2011
    Posts
    5
    Rep Power
    0

    Default doubt regarding variables

    friends,one of my team members at my has asked me that is there any difference between class variables and local variables.then i to got a doubt regarding it please give me the clarification.

    Regards,
    chandu gorentla,

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    What would you like clarified, I want to help you but I don't want to give you homework answers, do you have any more specific questions?

  3. #3
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    i can tell two differences:

    1. class variables lives as long the class runs, local variables lives as long the local blocks runs.
    2. class variables are declared with access modifiers, local have no access modifiers.

Similar Threads

  1. Doubt about 09
    By maya700 in forum New To Java
    Replies: 2
    Last Post: 08-17-2010, 06:37 PM
  2. a doubt
    By Thia in forum New To Java
    Replies: 13
    Last Post: 11-24-2009, 02:26 AM
  3. have doubt
    By ras_pari in forum Advanced Java
    Replies: 3
    Last Post: 10-01-2009, 09:51 AM
  4. What are Instance variables and static variables?
    By sandeshforu in forum New To Java
    Replies: 3
    Last Post: 09-09-2009, 05:48 PM
  5. doubt in jms
    By veena in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 01-05-2008, 01:42 PM

Posting Permissions

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