📄 showproperties.java
字号:
package dk.daimi.jones.app.smsdemo;
import dk.daimi.jones.services.sms.*;
import dk.daimi.jones.impl.sms.*;
/**
* @author Jonas Thomsen
*
* Shows the following properties of the connected mobile phone:
* Manufacturer
* Model
* IMEI number
*/
public class ShowProperties {
public static void main(String[] args) {
SMS sms = new SMSImpl();
System.out.print("Starting SMS service... ");
if (((SMSImpl)sms).open("COM1", "")) {
System.out.println("Done!");
System.out.println("SMS Device info:");
System.out.println("----------------");
System.out.println("Manufacturer: " + sms.getManufacturer());
System.out.println("Model.......: " + sms.getModel());
System.out.println("IMEI........: " + sms.getIMEI());
} else {
System.out.println("Failed!");
}
((SMSImpl)sms).close();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -