Java的final和static区别
linux下安拆后缀为bin的JavaJDK
Java数字转字符串前面主动补0的实现
import java。io。*;
import java。util。*;
import javax。mail。
import javax。mail。internet。*;
public class Mailer {
/** javamail session对象。 */
protected Session session;
/** 发信地址 */
protected String from;
/** 信的题目*/
protected String subject;
/** 存放字符串形式的收信地址 */
protected ArrayList toList = new ArrayList();
/** 抄送地址*/
protected ArrayList ccList = new ArrayList();
/** 暗送地址 */
protected ArrayList bccList = new ArrayList();
/** 信的文本内容*/
protected String body;
/** SMTP办事器地址*/
protected String mailHost;
/**能否在掌握台打印信息*/
protected boolean verbose=true;
/** Get from */
public String getFrom() {
return from;
public void setFrom(String fm) {
from = fm;
public String getSubject() {
return subject;
public void setSubject(String subj) {
subject = subj;
public ArrayList getToList() {
return toList;
public void setToList(ArrayList to) {
toList = to;
public void setToList(String s) {
toList = tokenize(s);
public void addTo(String to) {
toList。
add(to);
public ArrayList getCcList() {
return ccList;
public void setCcList(ArrayList cc) {
ccList = cc;
public void setCcList(String s) {
ccList = tokenize(s);
public void addCc(String cc) {
ccList。
add(cc);
public ArrayList getBccList() {
return bccList;
public void setBccList(ArrayList bcc) {
bccList = bcc;
public void setBccList(String s) {
bccList = tokenize(s);
public void addBcc(String bcc) {
bccList。
add(bcc);
public String getBody() {
return body;
public void setBody(String text) {
body = text;
public boolean isVerbose() {
return verbose;
public void setVerbose(boolean v) {
verbose = v;