Get variable in other classes

后端 未结 4 2007
旧时难觅i
旧时难觅i 2020-11-30 15:14

I need to get variable inString in other class. How can I do this?

public class main {
    public static StringBuffer inString;


    public sta         


        
4条回答
  •  悲哀的现实
    2020-11-30 15:48

    Since you made the field in the class static, you use the class name to access it, i.e.

    main.inString
    

提交回复
热议问题