Joke Collection Website - Public benefit messages - Java sends SMS verification
Java sends SMS verification
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:Xiaomi's 9se photo has been deleted. How to restore it?
- Next article:Mobile phone short message cover
- Related articles
- How to unlock Gionee s9 encrypted photo album?
- What's wrong with Samsung's mobile phone not receiving SMS?
- I wrote a letter to my boyfriend. I wonder if it will touch him. Can it work? Because I'm not in one place, I have some questions, but I don't know how to do it.
- How to use password to log in with Yin's mobile phone?
- How is the cinema in Shenzhen Shengyi Spa and Sauna? Is there any group purchase?
- How to check the traffic of Unicom, the kind that receives short messages
- What do you mean, you open Weizhong bank card and continue to pay with change?
- How does the Ministry of Industry and Information Technology deal with harassing calls?
- How to write soft articles for mobile phones
- Is the book of Tianyi Chengkao reliable?