Joke Collection Website - Public benefit messages - Java sends SMS verification

Java sends SMS verification

Example of packaging;

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");

}

}