Передать переменную из класса
Друзья, кодеры! Необходимо передать переменную из класса.
public static final String field_96138_a = "!" + randomes.lalka + "!";
public static class randomes {
public static void randoms(String[] args)
{
String[] currentRoom;
String [][] rooms = {{"Start", "Treasure Room1"}, {"Goblin Home1", "Spider Nest1"}};
Random rand = new Random();
currentRoom = rooms [rand.nextInt(rooms.length)];
textes = (Arrays.toString(currentRoom));
}
public static final String lalka = textes;
}
Нужно передать переменную "textes" в переменную "lalka";
Источник: Stack Overflow на русском