I need to get variable inString
in other class. How can I do this?
public class main {
public static StringBuffer inString;
public static void main(String[] args) {
inString = new StringBuffer("Our aim is to make a 15 realistic game, where grinding powerlines and doing a tailwhip isn't easy, like in the real world. A game in which you will feel like you're actual riding. A game in which creativity and beauty are combined. ");
inString = new StringBuffer(inString.toString().replaceAll(" +", " "));
}
}
So I try to use System.out.println(main.inString);
in my Textcl.class, but get null
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…