我到处搜索试图弄清楚 val$editorkit 或下面的 $ 符号是什么意思,但没有运气......请帮忙......
private synchronized void updateHtmlEditor(HTMLEditorKit editorkit, StringReader reader)
{
Runnable runnable = new Runnable(editorkit, reader)
{
public void run() {
try {
this.val$editorkit.read(this.val$reader, LinkParser.this.htmlViewEditor.getDocument(), LinkParser.this.htmlViewEditor.getDocument().getLength());
} catch (IOException ex) {
Logger.getLogger(LinkParser.class.getName()).log(Level.SEVERE, null, ex);
} catch (BadLocationException ex) {
Logger.getLogger(LinkParser.class.getName()).log(Level.SEVERE, null, ex);
}
}
};
SwingUtilities.invokeLater(runnable);
}
最佳答案
它没有任何特殊意义 - 它只是构成名称一部分的字母,就像它前面的 l
或后面的 e
一样。
请参阅 Identifiers 上的 JLS 部分有关名称中允许和不允许的内容的完整详细信息。
关于java - Java中的$符号是什么?请查看下面的 Java 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9142397/