java»ù´¡
JSPµÄ9¸öÄÚÖöÔÏóÊÇ£ºout¡¢request¡¢response¡¢page¡¢pageContext¡¢session¡¢application¡¢exception¡¢config¡£Òª×¢Òâ¶ÔÏóÃûµÄ´óСд
What results from attempting to compile and run the following code? public class Ternary{ public static void main(String args[]){ int a = 5; System.out.println("Value is - " + ((a < 5) ? 9.9 : 9)); } }
Ó¦¸ÃÊä³ö Value is -9.0
((a < 5) ? 9.9 : 9) ÕâÀïÒòΪǰÃæµÄ 9.9ÊÇ doubleÀàÐ͵ģ¬ËùÒÔºóÃæµÄ9Ò²»á±»×ª»»ÎªdoubleÀàÐ͵ĽøÐÐÊä³ö
Óï¾äint i=3.2£»Ëµ·¨ ´íÎó
±àÒë´íÎ󣬸¡µãÊý²»ÄÜ×Ô¶¯×ª»¯ÎªÕûÊý
Ïà¹ØÎĵµ£º
¡¡JSON ¼´ Java
Script Object Natation£¬ËüÊÇÒ»ÖÖÇáÁ¿¼¶µÄÊý¾Ý½»»»
¸ñʽ£¬·Ç³£ÊʺÏÓÚ·þÎñÆ÷
Óë Java
Script µÄ½»»¥¡£±¾ÎĽ«¿ìËÙ½²½â JSON ¸ñʽ£¬²¢Í¨¹ý´úÂëʾÀýÑÝʾÈçºÎ·Ö±ðÔÚ¿Í»§¶ËºÍ·þÎñÆ÷
¶Ë½øÐÐ JSON ¸ñʽÊý¾ÝµÄ´¦Àí¡£
¡¡¡¡Json±ØÐèµÄ°ü
¡¡¡¡commons-httpclient-3.1.jar
¡¡¡¡commons-lang-2.4.jar
¡¡¡¡ ......
ÔÚJavaÖУ¬Ê¹ÓÃnew¹Ø¼ü×ÖºÍClass.forName("a.class.Name").newInstance¶¼¿ÉÒÔ´´½¨¶ÔÏó£¬ËüÃÇÓÖÓÐʲôÇø±ðÄØ£¿
1¡¢ÀàµÄ¼ÓÔØ·½Ê½²»Í¬¡£
ÔÚÖ´ÐÐClass.forName("a.class.Name")ʱ£¬JVM»áÔÚclassapthÖÐÈ¥ÕÒ¶ÔÓ¦µÄÀಢ¼ÓÔØ£¬ÕâʱJVM»áÖ´ÐиÃÀàµÄ¾²Ì¬´úÂë¶Î¡£ÔÚʹÓà ......
±¾ÎÄÕë¶Ôjdk6.0ÖÐjava.lang.ClassÀàµÄAPI½øÐÐÁ˼òµ¥µÄʵÀýÓ¦Óã¬Àý×Ó¼òµ¥Ò׶®£¬±È½ÏÊʺÏÈëÃż¶ÔĶÁ¡£
ʵÀý¼ò½é£º
/*
*IncludeInnerClassÀàÖаüº¬ÁËÈýÖÖ·ÃÎÊ¿ØÖƵÄÄÚ²¿À࣬²¢ÇÒÒÔÕâÈý¸öÄÚ²¿ÀàµÄÒýÓöÔÏóºÍÒ»¸öÕûÐÍÊý×÷ΪÊôÐÔ£¬ÔÚÍⲿÀàµÄ·½·¨Öзֱðµ÷ÓÃÁË ÄÚ²¿ÀàµÄ·½·¨
*ÍⲿÀàÓÐÁ½¸ö¹¹Ôì·½·¨£¬ ......
µ±Ò»¸ö·½·¨ºóÃæÉùÃ÷¿ÉÄÜ»áÅ׳öInterruptedException Ò쳣ʱ£¬ËµÃ÷¸Ã·½·¨ÊÇ¿ÉÄܻỨһµãʱ¼ä£¬µ«ÊÇ¿ÉÒÔÈ¡ÏûµÄ·½·¨¡£
Å×InterruptedExceptionµÄ´ú±í·½·¨ÓУº
1. java.lang.Object ÀàµÄ wait ·½·¨
2. java.lang.Thread ÀàµÄ sleep ·½·¨
3. java.lang.Thread ÀàµÄ join ·½·¨
-- ÐèÒª»¨µãʱ¼äµÄ·½·¨
Ö´ÐÐwait·½·¨µÄÏ ......