Skip to main content
1 of 4
John
  • 2.8k
  • 5
  • 23
  • 24

Making java method arguments as final.

What difference that final makes between the code below. Is there any advantage in declaring the arguments as final.

public String changeTimezone( Timestamp stamp, Timezone fTz, Timezone toTz) { return .... }

public String changeTimezone(final Timestamp stamp, final Timezone fTz, final Timezone toTz) { return .... }

John
  • 2.8k
  • 5
  • 23
  • 24