![](/img/trans.png)
[英]What is the meaning of className variableName; variable declaration in java?
[英]What is the meaning of the classname from a lambda class in Java?
lambda 表达式的类名如下所示:
com.company.ParentClass$$Lambda$1/1096979270
在此示例中:
com.company.ParentClass
是包含 class。Lambda$1
是 static 合成方法中包含实现代码的 class1096979270
一个神秘的号码这个数字有什么意义吗? 在每个程序运行时,它都是相同的值。 听起来它是在编译时构建的。 但是重新编译也不会改变它。
Lambda class 名称有点不可预测。
约定:Lambda 名称是 package 的名称,后接 class,后接 $$Lambda$,后接数字,后接斜杠,再接另一个数字。
示例: com.company.ParentClass$$Lambda$x/yyyyyy
这里,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.