<i id='4bZgS'><tr id='4bZgS'><dt id='4bZgS'><q id='4bZgS'><span id='4bZgS'><b id='4bZgS'><form id='4bZgS'><ins id='4bZgS'></ins><ul id='4bZgS'></ul><sub id='4bZgS'></sub></form><legend id='4bZgS'></legend><bdo id='4bZgS'><pre id='4bZgS'><center id='4bZgS'></center></pre></bdo></b><th id='4bZgS'></th></span></q></dt></tr></i><div id='4bZgS'><tfoot id='4bZgS'></tfoot><dl id='4bZgS'><fieldset id='4bZgS'></fieldset></dl></div>
    1. <tfoot id='4bZgS'></tfoot>

      <small id='4bZgS'></small><noframes id='4bZgS'>

        <bdo id='4bZgS'></bdo><ul id='4bZgS'></ul>
      <legend id='4bZgS'><style id='4bZgS'><dir id='4bZgS'><q id='4bZgS'></q></dir></style></legend>

        Java 代表?

        Java Delegates?(Java 代表?)
        • <bdo id='139mI'></bdo><ul id='139mI'></ul>
            1. <tfoot id='139mI'></tfoot>

              <small id='139mI'></small><noframes id='139mI'>

                <tbody id='139mI'></tbody>

              <legend id='139mI'><style id='139mI'><dir id='139mI'><q id='139mI'></q></dir></style></legend>

              <i id='139mI'><tr id='139mI'><dt id='139mI'><q id='139mI'><span id='139mI'><b id='139mI'><form id='139mI'><ins id='139mI'></ins><ul id='139mI'></ul><sub id='139mI'></sub></form><legend id='139mI'></legend><bdo id='139mI'><pre id='139mI'><center id='139mI'></center></pre></bdo></b><th id='139mI'></th></span></q></dt></tr></i><div id='139mI'><tfoot id='139mI'></tfoot><dl id='139mI'><fieldset id='139mI'></fieldset></dl></div>

                  本文介绍了Java 代表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Java 语言是否具有委托功能,类似于 C# 对委托的支持?

                  Does the Java language have delegate features, similar to how C# has support for delegates?

                  推荐答案

                  不是,不是.

                  你也许可以通过使用反射来获取可以调用的 Method 对象来达到相同的效果,另一种方法是使用单个invoke"或execute"方法创建一个接口,然后将它们实例化为调用您感兴趣的方法(即使用匿名内部类).

                  You may be able to achieve the same effect by using reflection to get Method objects you can then invoke, and the other way is to create an interface with a single 'invoke' or 'execute' method, and then instantiate them to call the method your interested in (i.e. using an anonymous inner class).

                  您可能还会发现这篇文章很有趣/有用:一位 Java 程序员看 C# 代表 (@blueskyprojects.com)

                  You might also find this article interesting / useful : A Java Programmer Looks at C# Delegates (@blueskyprojects.com)

                  这篇关于Java 代表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  • <legend id='uw1UF'><style id='uw1UF'><dir id='uw1UF'><q id='uw1UF'></q></dir></style></legend>
                      <tbody id='uw1UF'></tbody>
                    <i id='uw1UF'><tr id='uw1UF'><dt id='uw1UF'><q id='uw1UF'><span id='uw1UF'><b id='uw1UF'><form id='uw1UF'><ins id='uw1UF'></ins><ul id='uw1UF'></ul><sub id='uw1UF'></sub></form><legend id='uw1UF'></legend><bdo id='uw1UF'><pre id='uw1UF'><center id='uw1UF'></center></pre></bdo></b><th id='uw1UF'></th></span></q></dt></tr></i><div id='uw1UF'><tfoot id='uw1UF'></tfoot><dl id='uw1UF'><fieldset id='uw1UF'></fieldset></dl></div>

                    <tfoot id='uw1UF'></tfoot>

                        1. <small id='uw1UF'></small><noframes id='uw1UF'>

                          • <bdo id='uw1UF'></bdo><ul id='uw1UF'></ul>