File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes final variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

final variables

Buddhi Vikasitha

Joined: Nov 01, 2012
Posts: 17

someone telll me the difference between these two codes..
93 compiles but 94 doesn't, i need to know why.

im an absolute beginner.. thankYou!!

Paul Clapham

Joined: Oct 14, 2005
Posts: 19875

Hi, and welcome to the Ranch!

But you're a bit late. People have been posting this exact question here for the last week, and there's a lot of them which already have the answer. So just click on the "Search" link and search for 101, and you'll find a lot of other people interested in exactly that code. Maybe they are even in the same class as you.
Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

Locking, since this exact question, with very complete answers, has appeared several times recently.
I agree. Here's the link:
subject: final variables
It's not a secret anymore!