3 Replies Latest reply: Apr 4, 2014 3:50 AM by jwenting RSS

    Cannot refer to a non-final variable inside an inner class defined in a different method

    shivasha

      Created a java.sql.connection object.

      Refering
      those obj inside
      public void run() {


      }

      If i declare as
      final inside a method, i can't refer those outside method due to scope.


      Cannot refer to a non-final variable dbConnObj inside an inner class
      defined in a different method