Pessoal uma dúvida, é possível transformar uma string em constante, por exemplo:
public interface NConst {
public static final int UM = 1;
}
class Teste implements NConst {
private int num1 = UM; //Nessa situação funciona pois estou passando a constante
private String x = “UM”;
private int num2 = x; //Existe alguma forma de tratar o X para que ele se torne uma constante?
}