当前位置: 动力学知识库 > 问答 > 编程问答 >

java - How can I access a String in an inner class later on in my code?

问题描述:

This question already has an answer here:

  • What does a “Cannot find symbol” compilation error mean?

    6 answers

网友答案:

You can make that string variable to which you are saving the input from the JOption dialog box as a public global variable. That should make it accessible from inner classes. This question might be helpful to learn about inheritance. it should show you how to set variables so they can be inherited correctly. Difference between private, public, and protected inheritance

分享给朋友:
您可能感兴趣的文章:
随机阅读: