host != null ? new InetSocketAddress(host, port) :
new InetSocketAddress(InetAddress.getByName(null), port),
new InetSocketAddress(0), true);
帮忙解决一下!谢谢大家
new InetSocketAddress(InetAddress.getByName(null), port),
new InetSocketAddress(0), true);
帮忙解决一下!谢谢大家
new InetSocketAddress(InetAddress.getByName(null), port),
new InetSocketAddress(0), true);
相当于 if(host != null)
{
new InetSocketAddress(host, port)
}
else
{
new InetSocketAddress(InetAddress.getByName(null), port),
new InetSocketAddress(0), true)
}
如果<表达式>的值为false,则执行<代码2>
{
host - new InetSocketAddress(host, port)
}
else
{
host = new InetSocketAddress(InetAddress.getByName(null), port),
new InetSocketAddress(0), true)
}
如果<表达式>的值为false,则执行<代码2>
1.--!=null?new InetSocketAddress(host, port):new InetSocketAddress(InetAddress.getByName(null), port)
2.--new InetSocketAddress(0)
3.-true.各位我说的对吗????
但this() 这个方法是什么意思?呵呵 新手!
如果条件为true则取冒号之前否则取之后
--------------------------------
表达式真
执行:代码1;
================
表达式非真
执行:代码2;