Joke Collection Website - Blessing messages - Java batch sending SMS
Java batch sending SMS
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");
}
}
- Related articles
- Is there a discount for the birthday of the membership card of Taiping Bird Clothing Store? Can I get a birthday present for free?
- Requirements for professional pre-approval
- How often does Xiaomi's SMS verification code resume?
- How to check the lost electric car ticket?
- Is the legal notice message true?
- What are the recruitment processes of Qingdao Bank?
- Tianjin epidemic prevention and control consultation telephone is open 24 hours.
- The home will be decorated at the end of the year. Can you tell us the details of the kitchen decoration? thank you
- How to obtain evidence from SMS bombing
- I have always liked my girlfriend, but she cheated on my feelings. She is my first love, and I really care about her. What should I do?