如何在java接口中定义Getter和Setter(Property) [英] How to define Getter and Setter (Property) in java interface
本文介绍了如何在java接口中定义Getter和Setter(Property)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在m应用程序中使用RMI。所以使用界面是强制性的。我想强制develpoer实现getter和setter。所以我想在我的界面中定义getter和setter方法。我怎样才能做到这一点?不幸的是没有有用的文章或链接来帮助我。
I want to use RMI in m application. So using the interface is compulsory. I want to force the develpoer to implement getter and setters. So I want to define the getter and setter methods in my interface. How can I do this? Unfortunately there is no usefull article or link to help me.
推荐答案
这些链接 [ ^ ]?大量示例代码和解释。
What about these links[^]? Lots of sample code and explanations.
访问此
http://programmers.stackexchange.com/questions/168134/which-order-to-define-getters-and-setters-在 [ ^ ]
http://programmers.stackexchange.com/questions/21802/when-are-getters-and-setters-justified [ ^ ]
希望这有助于
visit this
http://programmers.stackexchange.com/questions/168134/which-order-to-define-getters-and-setters-in[^]
http://programmers.stackexchange.com/questions/21802/when-are-getters-and-setters-justified[^]
hope this will help
这篇关于如何在java接口中定义Getter和Setter(Property)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文