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

Java»ù´¡——javaµÄÒýÓÃÎÊÌâ

1.
public class EasyError1 {
     class Student {
           private String name;
 
           public String getName() {
              return name;
           }
 
           public void setName(String name) {
              this.name = name;
           }
           }
public List<Student> getList(List<String> names){
    List<Student> studentList=new ArrayList<Student>();
    Student student=new Student();
    for(String str:names){
       student.setName(str);
       studentList.add(student);
    }
    return studentList;
}
public static void main(String[] args) {
    EasyError1 easyError1=new EasyError1();
    List<String> list=new ArrayList<String>();
    list.add("pitt");
    list.add("tom");
    list.add("weiling");
List<Student> studentList=  easyError1.getList(list);
for(Student student:studentList){
    System.out.println(student.getName());
}
}
}
/******************************************************
 * the results in console:
 *  weiling
 *  weiling
 *  weiling
 *ÒòΪStudent student=new Student();дÔÚÁËÑ­»·µÄÍâÃ棬ÔÚÑ­»·Àïÿ´Î¶¼°ÑÃû×Ö·ÅÔÚÁËÒ»¿é¶ÑÄÚ´æÀ²¢°ÑÒýÓÃ
 *´æ·ÅÔÚÁËlistÖУ¬Ö»ÊÇÒ»¸öÒýÓ㬶ø²»ÊÇÈý¸ö²»Í¬µÄÒýÓôæ·ÅÔÚlistÖУ¬×îºó£¬Õâ¸öÒýÓÃÖ»ÏëÏòÁË“


Ïà¹ØÎĵµ£º

JAVAÒì³£×Ü½á ¼Ì³Ð

ÒÔÏÂÊǶÔJAVAÒì³£µÄ¼Ì³Ð»úÖƵÄһЩ×ܽᡣ
1. RuntimeExceptionÓëException, Error²»Í¬µã£º µ±·½·¨ÌåÖÐÅ׳ö·ÇRuntimeException£¨¼°Æä×ÓÀࣩʱ£¬·½·¨Ãû±ØÐëÉùÃ÷Å׳öµÄÒì³££»µ«Êǵ±·½·¨ÌåÖÐÅ׳öRuntimeException£¨°üÀ¨RuntimeException×ÓÀࣩʱ£¬·½·¨Ãû²»±ØÉùÃ÷¸Ã¿ÉÄܱ»Å׳öµÄÒì³££¬¼´Ê¹ÉùÃ÷ÁË£¬JAVA³ÌÐòÔÚij¸öµ÷Óõĵط½£¬Ò² ......

java ÃæÊÔÌâ59µÀ£¨º¬²Î¿¼´ð°¸£©


Java
»ù´¡·½Ãæ
:
 
1
¡¢×÷ÓÃÓò
public,private,protected,
ÒÔ¼°²»Ð´Ê±µÄÇø±ð
´ð£º
Çø±ðÈçÏ£º
×÷ÓÃÓò
           
µ±Ç°Àà
       
ͬһ
package  
×ÓËïÀà
     &n ......

JAVA±ÊÊÔÌ⾫»ª°æ1.0


JAVA±ÊÊÔÌ⾫»ª°æ1.0
public class Test2
{
    public static void main(String[] args)
    {
        Float a = new Float(3.4);
      &n ......

JAVA¶¨Ê±Æ÷ Timer+TimerTask

     ±¾ÎÄÊ×ÏÈÉè¼ÆÒ»¸öµ¥´Î¶¨Ê±Æ÷Timer+TimerTask£¬È»ºóÔٴλù´¡ÉÏÉè¼ÆÒ»¸öÑ­»·¶¨Ê±Æ÷¡£
     ÎÒ½«°Ñ java.util.Timer ºÍ java.util.TimerTask ͳ³ÆΪ Java ¼ÆʱÆ÷¿ò¼Ü£¬ËüÃÇʹ³ÌÐòÔ±¿ÉÒÔºÜÈÝÒ׵ؼƻ®¼òµ¥µÄÈÎÎñ£¨×¢ÒâÕâЩÀàÒ²¿ÉÓÃÓÚ J2ME ÖУ©¡£²»¹ý£¬Java ¼ÆʱÆ÷¿ò¼ÜûÓÐ× ......

javaµÄһЩ³£Óðü

commons-digester.jar
Digester»ùÓÚ¹æÔòµÄXMLÎĵµ½âÎö,Ö÷ÒªÓÃÓÚXMLµ½Java¶ÔÏóµÄÓ³Éä.
commons-beanutils.jar
Ìṩ¶ÔJava ·´ÉäºÍ×ÔÊ¡APIµÄ°ü×°.
aspectjweaver.jar
ÓÃÓÚÔÚSpring 2.0Öм¯³ÉAspectJ AspectJ LTWÖ¯ÈëÆ÷
ognl.jar
OGNLÊÇObject-Graph Navigation LanguageµÄËõд£¬ËüÊÇÒ»ÖÖ¹¦ÄÜÇ¿´óµÄ±í´ïʽÓïÑÔ£¨E ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ