- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
什么情况下返回值为true?
谢谢大家!
public class Test1 {
public static void main(String[] args) {
try {
Enumeration<NetworkInterface> networkInterface = NetworkInterface
.getNetworkInterfaces();
while (networkInterface.hasMoreElements()) {
NetworkInterface eachNetworkInterface = networkInterface
.nextElement();
System.out.println(eachNetworkInterface.getName() + " "
+ eachNetworkInterface.isVirtual());
}
} catch (SocketException e) {
e.printStackTrace();
}
}
}
打印结果全部错误!为什么?如何打印 true?
最佳答案
根据javadocs :
Returns whether this interface is a virtual interface (also called subinterface). Virtual interfaces are, on some systems, interfaces created as a child of a physical interface and given different settings (like address or MTU). Usually the name of the interface will the name of the parent followed by a colon (:) and a number identifying the child since there can be several virtual interfaces attached to a single physical interface.
如果您得到的结果均为false
,则仅意味着您的系统中没有创建任何子接口(interface)。
关于Java networkinterface.isVirtual() 方法总是返回值是 false?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32651463/
什么情况下返回值为true? 谢谢大家! public class Test1 { public static void main(String[] args) { try {
本文整理了Java中org.apache.catalina.WebResource.isVirtual()方法的一些代码示例,展示了WebResource.isVirtual()的具体用法。这些代码示
在测试虚拟化面板时,我需要设置 VirtualizingPanel.IsVirtualizing 属性,以便 Teststack.White 可以像与非虚拟化面板一样与它们交互。 这对我很有帮助,尤其
我做了一个简单的例子来重现我在 TreeView 上遇到的问题.如果我在 TreeView 中选择一个项目,向下滚动,更改 Focus ,然后在 TreeView 中选择一个项目再次,列表开始跳来跳去
几乎没有关于设置影响的信息; VirtualizingStackPanel.IsVirtualizing="True" 和 EnableRowVirtualization="True" EnableC
我在使用 this question 时遇到了类似的问题但是 VirtualizingStackPanel.IsVirtualizing="False" 没有解决我的问题。有没有人面临同样的问题? 问
我是一名优秀的程序员,十分优秀!