Given the following code:
public class A {
static final long tooth = 1L;
static long tooth(long tooth){
System.out.println(++tooth);
return ++tooth;
When you are at this point
System.out.println(tooth);
the class property (static final long tooth = 1L;) is used, then a new tooth is declared, which shadows the class property, meaning that it is used instead of that.
Inside the tooth method the tooth variabile is passed as value, it will not be modified, you can see this by executing the main which gives:
1
3
2