| | |
 | |
CommPortIdentifier: getPortIdentifiers() |
прегледано: |
2196 |
вкупно гласови: |
0 |
средна оценка: |
- |
коментари: |
0 |
 испрати до пријател
 испечати
|
import java.util.Enumeration;
import javax.comm.CommPortIdentifier;
public class MainClass {
public static void main(String[] ap) {
Enumeration pList = CommPortIdentifier.getPortIdentifiers();
while (pList.hasMoreElements()) {
CommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();
System.out.print("Port " + cpi.getName() + " ");
if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL) {
System.out.println("seriski port: " + cpi);
} else if (cpi.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
System.out.println("paralelen port: " + cpi);
} else {
System.out.println("nepoznat port: " + cpi);
}
}
}
}
|
|
|
|
|
|
| |
|
|
---|
JavaTM и Java-базираните ознаки се трговски марки или регистрирани трговски марки на Sun Microsystems, Inc. во САД и други држави. Java.com.mk никако не соработува со Sun Microsystems, Inc. Сите други трговски марки се сопственост на нивните сопственици. |
|