0

I have following java code.

public class Settings {

    public static float delay= 3f; // in seconds


}

And following lua code

local a = luajava.bindClass("Settings");
print (a.delay) -- works normally
-- a.delay = 5; -- this will cause "attempt to index local "a"

I can't set new value to the public static variable "delay". Can I override java public static variable in lua?

WeiHung
  • 109
  • 2
  • 10

1 Answers1

0

Variables in interfaces are always implicitly final, which is why they can't be overwritten.

Stultuske
  • 9,296
  • 1
  • 25
  • 37