Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java ÊÕÓʼþ ʹÓà mail°ü

import java.util.Properties;
import javax.mail.FetchProfile;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.internet.InternetAddress;

public class ReceiveMail
{
public ReceiveMail(){}

public static void main(String[] args)
{
receive();
}

public static void receive()
{
try
{
Properties props = new Properties();
Session s = Session.getInstance(props);
Store store = s.getStore("pop3");

//¶ÔÓ¦¸Ä³É×Ô¼ºµÄÓû§ÃûºÍÃÜÂë
store.connect("pop.sina.com", "userName", "******");

Folder folder = store.getFolder("Inbox");
folder.open(Folder.READ_WRITE);

FetchProfile profile = new FetchProfile();
profile.add(FetchProfile.Item.ENVELOPE);
Message arraymessage[] = folder.getMessages();
folder.fetch(arraymessage, profile);

System.out.println("ÊÕ¼þÏäµÄÓʼþÊý£º" + arraymessage.length);
for (int i = 0; i < arraymessage.length; i++)
{
//Óʼþ·¢ËÍÕß
String from = arraymessage[i].getfrom()[0].toString();
InternetAddress ia = new InternetAddress(from);

System.out.println("******" + i + "******");

System.out.println("from:" + ia.getPersonal() + '(' + ia.getAddress() + ')');

//Óʼþ±êÌâ
System.out.println("Title:" + arraymessage[i].getSubject());

//Óʼþ´óС
System.out.println("Size:" + arraymessage[i].getSize(


Ïà¹ØÎĵµ£º

´ø×Åjavaѧpython

1. pythonÊÇÒ»ÖÖÈõÀàÐ͵Ľű¾ÓïÑÔ£¬ÔÚ¸ø±äÁ¿¸³ÖµÊÇÎÞÐèÖ¸¶¨±äÁ¿µÄÀàÐÍ£¬ÀýÈ磺
x=1                        #£¨ÕûÐÍ£©-------·¶Î§ÔÚ-2^31->2^31
x=2345L     &n ......

javaÓëC++ÖÐÎÄ×Ö·ûµÄÎÊÌâ

 
ÖÐÎĵıàÂë³£ÓõÄÓÐ3ÖÖ¸ñʽ£º1£©gb2312(¾ÍÊÇasciiÂ뷽ʽ£¬Ò²Ëµansi) 2)unicode 3)utf-8
c++Ò»°ã²ÉÓÃanciiÂ룬¶øjavaÒ»°ã²ÉÓÃunicode£¬¶øSymbianC++£¨ÒÔºó¼ò³Æsymbian£©²ÉÓÃunicode»òutf-8
±ÈÈ纺×Ö“ºÃ”£º unicodeΪ“7D 59”£¬¶øasciiΪ“BA C3”, utf-8±àÂëΪ3¸ö×Ö½Ú¡£
ÖÕ¶ËÄã ......

JAVAÀàÎļþ°æ±¾(class version)ÓëJDK¶ÔÓ¦¹Øϵ

Ò»¸öjavaµÄclassÎļþÊÇÒ»¸ö¶þ½øÖÆÎļþ£¬ÆäÖÐÇ°Ëĸö×Ö½ÚÊÇmagic룬µÚÎåµ½µÚÁù¸ö×Ö½Ú¶ÔÓ¦ÓÚminorºÍmajor£¬ÏÂÃæÊÇÕâ¸öÀàÎļþ°æ±¾ÓëJDKµÄ¶ÔÓ¦¹Øϵ¡£classÎļþµÄminorºÍmajor¿ÉÒÔͨ¹ýultraeditÀ´²é¿´£¬»ò×Ô¼º±à³ÌµÈ¡£
major minor Java platform version
45 3 1.0
45 3 1.1
46 0 ......

¡¶Effective javaÖÐÎĵÚ2°æ¡·¶ÁÊé±Ê¼Ç1

µÚ2Ìõ£ºÓöµ½¶à¸ö¹¹ÔìÆ÷²ÎÊýʱҪ¿¼ÂÇÓù¹½¨Æ÷
ij¸öÀàµÄÊôÐԽ϶࣬³õʼ»¯µÄʱºòÓÖÓÐһЩÊDZØÐë³õʼ»¯µÄ£¬¶øÇÒÀàÐÍÓÐÐÎͬ£¬
±ÈÈçnew Contact("ÐÕÃû","ÏÔʾÃû","ÊÖ»úºÅ","·ÉÐźÅ","ËùÔÚµØ",ÄêÁä,ÐÔ±ð);
Ç°5¸öÊôÐÔÊÇString ÀàÐÍ£¬ºó2¸öÊÇintÀàÐÍ£¬ÔÚÌîд¹¹Ôì·½·¨µÄʱºòºÜÈÝÒ×Ìîд´í룬»òÕßÉÙÌîд£¬»òÕߵߵ¹ÁËÊôÐÔ£¬
ÈçÏ ......

ÉîÈëÀí½âjava¶à̬ÐÔ

                        ÉîÈëÀí½âjava¶à̬ÐÔ
        ×òÌì¿´µ½Ò»¸ö¹ØÓÚ¶à̬ÐÔµÄÌû×Ó£¬²Î¿¼ÁË»ØÌûÕßµÄÀí½â£¬¼ÓÈëÁËһЩ×Ô¼ºµÄ¿´·¨£¬ÕûÀí³öÀ´¹©´ó¼Ò²Î¿¼£¬²»Ò»¶¨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ