Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
package Sartre.Connect4; import javax.swing.*; public class ChatGUI extends JDialog { public ChatGUI(){ setTitle("Chat"); }
}
当我在同一个包中的另一个类中执行此操作时:
ChatGUI chatGUI = new ChatGUI();
我最终遇到了一种情况:找不到符号
请帮忙?
“找不到符号”意味着编译器找不到在您的代码中使用的类、方法或字段(它还会准确地告诉您是哪一个)。这意味着两件事之一:
两个文件都在目录中吗
<project root>/Sartre/Connect4 ?
如果结构是,它可能会搞砸
<project root>/Sarte.Connect4