|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Java的B/s开发是通常是javaweb开发,又叫J2EE开发,J2SE是手机开发。C#的C/s和B/s开发是说.net和Asp开发。。u在这里说明一点;资深一点的Java和C#程序员都明白一点
经由过程反射API机关对象,并利用反射挪用体例会见对象的public/private办法和字段。
package lavasoft.test;
/**
* 测试的营业类
*
* @author leizhimin 2010-5-6 20:16:10
*/
public class MyService {
private String msg;
public MyService() {
System.out.println("log: 无参机关办法lavasoft.test.MyService.MyService()被挪用过了!");
}
public MyService(String msg) {
System.out.println("log: 有参机关办法lavasoft.test.MyService.MyService()被挪用过了!");
this.msg = msg;
}
public String doSomething(String person, String something) {
System.out.println("log: 营业办法lavasoft.test.MyService.doSomething()被挪用过了!");
return person + " is doing " + something + "! " +
"附加动静:" + msg;
}
public String getMsg() {
System.out.println("log: lavasoft.test.MyService.getMsg()被挪用过了!");
return msg;
}
public void setMsg(String msg) {
System.out.println("log: lavasoft.test.MyService.setMsg()被挪用过了!");
this.msg = msg;
}
private String doPrivate() {
System.out.println("log: 公有办法lavasoft.test.MyService.doPrivate()被挪用过了!");
return "公有办法doPrivate()被挪用了!";
}
}
<p>
Java到底会发战成什么样,让我们拭目以待吧,我始终坚信着java会更好。以上都是俺个人看法,欢迎大家一起交流. |
|