Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Method local Inner class

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Location
    INDIA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Method local Inner class

    Hello,
    What is the use of making a local variable inside a method final , which has an inner class in it.
    How can a method local class access a local variable marked final.If we don't make the variable final inner class can't access the variable.Is it related to stack or heap something?


  2. #2
    Member GoodbyeWorld's Avatar
    Join Date
    Jul 2012
    Location
    Hidden command post deep within the bowels of a hidden bunker somewhere under a nondescrip building
    Posts
    189
    My Mood
    Stressed
    Thanks
    18
    Thanked 30 Times in 30 Posts

    Default Re: Method local Inner class

    java - How does marking a variable as final allow inner classes to access them? - Stack Overflow

Similar Threads

  1. Call class method from another class
    By NewbieJavaProgrammer in forum Object Oriented Programming
    Replies: 1
    Last Post: November 21st, 2012, 05:56 AM
  2. local class incompatible: stream classdesc serialVersionUID Problem
    By Rony123 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: August 27th, 2012, 06:33 AM
  3. scope of a class created as local variable
    By Samaras in forum Java Theory & Questions
    Replies: 6
    Last Post: August 25th, 2012, 06:01 PM
  4. create a test class (main method) to start(run) the class in Java
    By curious725 in forum Java Theory & Questions
    Replies: 5
    Last Post: August 1st, 2012, 03:21 AM
  5. Accessing a method of one class in another class
    By Sai in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 23rd, 2010, 04:06 PM

Tags for this Thread