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

java³£ÓÃÀàµÄʹÓ÷½·¨

java³£ÓÃÀàµÄʹÓ÷½·¨
Interger£ºÕûÊýÀàÐÍ
£±¡¢ÊôÐÔ¡£
static int MAX_VALUE£º·µ»Ø×î´óµÄÕûÐÍÊý£»
static int MIN_VALUE£º·µ»Ø×îСµÄÕûÐÍÊý£»
static Class TYPE £º·µ»Øµ±Ç°ÀàÐÍ¡£
Àý×Ó£º
´úÂë:
System.out.println("Integer.MAX_VALUE: " + Integer.MAX_VALUE );
½á¹ûΪ£ºInteger.MAX_VALUE: 2147483647
 
£²¡¢¹¹Ô캯Êý¡£
Integer(int value) £ºÍ¨¹ýÒ»¸öintµÄÀàÐ͹¹Ôì¶ÔÏó£»
Integer(String s) £ºÍ¨¹ýÒ»¸öStringµÄÀàÐ͹¹Ôì¶ÔÏó£»
Àý×Ó£º
´úÂë:
Integer i = new Integer("1234");
Éú³ÉÁËÒ»¸öֵΪ1234µÄInteger¶ÔÏó¡£
 
£³¡¢·½·¨¡£
˵Ã÷£º
1. ËùÓз½·¨¾ùΪpublic£»
2. Êéд¸ñʽ£º¡²ÐÞÊηû¡³¡¡<·µ»ØÀàÐÍ> <·½·¨Ãû£¨¡²²ÎÊýÁÐ±í¡³£©>
È磺
static int parseInt(String s) ±íʾ£º´Ë·½·¨£¨parseInt£©ÎªÀà·½·¨£¨static£©£¬·µ»ØÀàÐÍΪ£¨int£©£¬·½·¨ËùÐè²ÎÊýΪStringÀàÐÍ¡£
1. byteValue()£ºÈ¡µÃÓÃbyteÀàÐͱíʾµÄÕûÊý£»
2. int compareTo(Integer anotherInteger) £º±È½ÏÁ½¸öÕûÊý¡£ÏàµÈʱ·µ»Ø£°£»Ð¡ÓÚʱ·µ»Ø¸ºÊý£»´óÓÚʱ·µ»ØÕýÊý¡£
Àý×Ó£º
´úÂë:
Integer i = new Integer(1234);
System.out.println("i.compareTo: " + i.compareTo(new Integer(123)) );
½á¹ûΪ£ºi.compareTo: 1
 
3. int compareTo(Object o) £º½«¸ÃÕûÊýÓëÆäËûÀà½øÐбȽϡ£Èç¹ûoҲΪIntegerÀ࣬½øÐз½·¨2 µÄ²Ù×÷£»·ñÔò£¬Å׳öClassCastExceptionÒì³£¡£
4. static Integer decode(String nm) £º½«×Ö·û´®×ª»»ÎªÕûÊý¡£
5. double doubleValue() £ºÈ¡µÃ¸ÃÕûÊýµÄË«¾«¶È±íʾ¡£
6. boolean equals(Object obj) £º±È½ÏÁ½¸ö¶ÔÏó¡£
7. float floatValue() £ºÈ¡µÃ¸ÃÕûÊýµÄ¸¡µãÊý±íʾ¡£
8. static Integer getInteger(String nm) £º¸ù¾ÝÖ¸¶¨ÃûÈ·¶¨ÏµÍ³ÌØÕ÷Öµ¡£
9. static Integer getInteger(String nm, int val) £ºÉÏÃæµÄÖØÔØ¡£
10. static Integer getInteger(String nm, Integer val) £ºÉÏÃæµÄÖØÔØ¡£
11. int hashCode() £º·µ»Ø¸ÃÕûÊýÀàÐ͵ĹþÏ£±íÂë¡£
12. int intValue() £º ·µ»Ø¸ÃÕûÐÍÊýËù±íʾµÄÕûÊý¡£
13. long longValue() £º·µ»Ø¸ÃÕûÐÍÊýËù±íʾµÄ³¤ÕûÊý¡£
14. static int parseInt(String s) £º½«×Ö·û´®×ª»»³ÉÕûÊý¡£s±ØÐëÊÇʱ½øÖÆÊý×é³É£¬·ñÔòÅ׳öNumberFormatExceptionÒì³£¡£
15. static int parseInt(String s, int radix) £ºÒÔradixΪ»ùÊýradix·µ»ØsµÄÊ®½øÖÆÊý¡£ËùνµÄ»ùÊý£¬¾ÍÊÇ“¼¸½øÖÆ”¡£


Ïà¹ØÎĵµ£º

ͨ¹ýJava¼¸ÐдúÂë½ØÈ¡ÆÁÄ»

ͨ¹ýjava.awt.RobotµÄcreateScreenCapture½ØÆÁ¡£
    public static void captureScreen(String fileName) throws Exception {
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Rectangle screenRectangle = new Rectangle(screenSize);
& ......

javaÔõôʵÏÖ·ÖÒ³

1.PaginationTable.java
package com.sinoest.train.common;
import java.util.List;
/**
* ·ÖÒ³±í
* @author ÀîÒ×烜-ÐÞ¸Ä
* 2009-6-17
*/
public class PaginationTable {
private List<?> entryList;//> Êý¾Ý
private int totalNumOfRows;// ×ÜÐÐÊý
private int rowsPerPage = 10;// ......

ÈÏʶJavaÐéÄâ»úµÄÄÚ²¿Ìåϵ½á¹¹

JavaÐéÄâ»úµÄÄÚ²¿Ìåϵ½á¹¹Ò²ÐíºÜÉÙÓÐÈËÈ¥¹ØÐÄ£¬ÒòΪ¶ÔÓÚJava³ÌÐòÔ±À´Ëµ£¬Ò»°ãÖ»ÐèÒª¸úAPI´ò½»µÀ¾Í¿ÉÒÔÁË¡£ÕâЩÌåϵ½á¹¹Ö»ÊÇJavaÐéÄâ»úÄÚ²¿µÄ½á¹¹¶øÒÑ¡£µ«ÊÇÈç¹ûÀí½âÁËÆäÄÚ²¿½á¹¹£¬¶ÔÓÚÎÒÃÇ¿ª·¢ÏîÄ¿£¬ÒÔ¼°ÅųýϵͳÖеÄÏà¹Ø¹ÊÕÏÊÇÓÉ°ïÖúµÄ¡£
ÏÈ¿´¿´×ÜÌå½á¹¹Í¼£¬ÈçÏ£º
¸÷²¿·ÖµÄÖ÷Òª¹¦ÄÜ·Ö±ðÊÇ£º
1. Àà×°ÔØ×Óϵͳ:¸ºÔðJavaÀ ......

Java»·¾³ÅäÖÆ

JAVA_HOME:
C:\Java\jdk1.6.0_17
Path:
%JAVA_HOME%\bin
ClassPath:
.;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar
ÎÒÃÇÐèÒªÉèÖÃÈý¸ö»·¾³±äÁ¿£ºJAVA_HOME¡¢PATH ºÍ CLASSPATH¡£
JAVA_HOME£º¸Ã»·¾³±äÁ¿µÄÖµ¾ÍÊÇ Java ËùÔÚµÄĿ¼£¬Ò»Ð© Java °æµÄÈí¼þºÍÒ»
Щ Java µÄ¹¤¾ßÐèÒªÓõ½¸Ã±äÁ¿£¬ÉèÖà PATH ºÍ CLASSP ......

JAVA¹Ø¼ü×ÖÏê½â

JAVA¹Ø¼ü×ÖÏê½â
1 finalÊý¾Ý£º
   1>¶ÔÓÚ»ù±¾ÀàÐÍÇ°¼ÓÒÔfinalÐÞÊΣ¬±íʾ±»ÐÞÊεıäÁ¿Îª³£Êý£¬²»¿ÉÒÔÐ޸ġ£Ò»¸ö¼ÈÊÇstaticÓÐÊÇfinalµÄ×ֶαíʾֻռ¾ÝÒ»¶Î²»ÄܸıäµÄ´æ´¢¿Õ¼ä¡£
   2>finalÓÃÓÚ¶ÔÏóÓ¦ÓÃʱ£¬finalʹӦÓú㶨²»±ä¡£Ò»µ©ÒýÓñ»³õʼ»¯Ö¸ÏòÒ»¸ö¶ÔÏ󣬾ÍÎÞ·¨ÔÙ°ÑËüÖ¸ÏòÁíÒ»¸ö¶ÔÏó¡£
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ