Skip to content

Instantly share code, notes, and snippets.

@oleander
Forked from Tarrasch/gist:835936
Created February 20, 2011 12:27
Show Gist options
  • Save oleander/835938 to your computer and use it in GitHub Desktop.
Save oleander/835938 to your computer and use it in GitHub Desktop.
public abstract class Mixologist extends Person {
protected static int numServings = 0;
protected static synchronized void addServing()
{
numServings++;
}
...
}
Compiling Simulation
jrGen/Mixologist.java:26: cannot assign a value to final variable numServings
numServings++;
^
1 error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment