Joke Collection Website - Public benefit messages - Java short message sending interface
Java short message sending interface
Import java.util.scanner;
Public class entry {
Public static void main (strinargs []) {
Scanner sc = new scanner (system. in);
String pno, msg
System.out.print ("Please enter message content:");
msg = sc . nextline();
System.out.println ("Please enter the target mobile phone number:");
pno = sc . nextline();
short mesg newmsg = new short mesg();
newmsg . set phoneno(pno);
newmsg . set message(msg);
SendMesg send = new SendMesg(newmsg);
send . send();
}
}
Class is called g {
Public abbreviation g(){
}
Private string pno, msg
Public empty phone number (string pno ){ (
this.pno = pno
}
Public string getPhoneNO(){
Return this.pno
}
Public void setMessage (
this.msg = msg
}
Public string getMessage(){
Return this.msg
}
}
Class sends messages {
Private short message MMS;
Public sending MMS (short message MMS) {
this.mms = mms
}
Public void send(){
System.out.println ("SMS content:"+MMS. getmessage ());
System.out.println ("target phone:"+mms.getphoneno ()+"\ n");
}
}
- Previous article:A short message to wake up the girl.
- Next article:Will there be a short message when the post office picks up 100?
- Related articles
- How to lock Nokia's screen wallpaper
- What are the tariffs for roaming to Brazil for postpaid users?
- How to modify the limit of bank card construction?
- The county government issued a notice to all units through the Guangdong government to solve the problem.
- Blessing information of heavy snow and solar terms
- How to deal with illegal parking without receiving the penalty form from the Urban Management Law Enforcement Bureau?
- When is it appropriate to send a blessing message to a friend during the Mid-Autumn Festival? Morning, afternoon or evening?
- After borrowing cash from Baidu, I received a SMS notification ~ What if I don't return it? Will it really go to the central bank's credit information system?
- How to report high-speed violations?
- He prototype Chen