Can Somebody Explain this java code

Posted by dubbeat on Stack Overflow See other posts from Stack Overflow or by dubbeat
Published on 2010-05-25T13:49:17Z Indexed on 2010/05/25 14:01 UTC
Read the original article Hit count: 237

Filed under:
|

Hi, I'm just starting out on android and my java is verry rusty. I can't remember ever seeing a function nested in another function like this before. Could somebody explain to me exactly what final does and explain why you would nest a function in another like this?

private final Handler handler = new Handler() {
        @Override
        public void handleMessage(final Message msg) {
            Log.v(Constants.LOGTAG, " " + ReviewList.CLASSTAG + " worker thread done, setup ReviewAdapter");
            progressDialog.dismiss();
            if ((reviews == null) || (reviews.size() == 0)) {
                empty.setText("No Data");
            } else {
                reviewAdapter = new ReviewAdapter(ReviewList.this, reviews);
                setListAdapter(reviewAdapter);
            }
        }
    };   

© Stack Overflow or respective owner

Related posts about java

Related posts about android