我正在使用此代碼分隔下一行並給出空間。有沒有更簡單的代碼來分隔行?
String sms="Name:"+name+ System.getProperty ("line.separator")+System.getProperty
("line.separator")+"ContactNumber:"+contactnumber+ System.getProperty
("line.separator")+"Quantity:"+quantity+System.getProperty
("line.separator")+"Number.of.Pcs:"+noofpieces+System.getProperty
("line.separator")+"Date and Time:"+dateandtime
+System.getProperty ("line.separator")+"Delivary
Address:"+deliveryaddress;
你有沒有嘗試「\ n」? – 2013-09-26 12:57:17
雅它沒有工作 – Deepak