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

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

JAVA³£ÓÃÀàµÄʹÓ÷½·¨
£±¡¢IntegerÀà
£²¡¢FloatÀà
£³¡¢DoubleÀà
£´¡¢CharacterÀà
£µ¡¢StringÀà
£¶¡¢StringTokenizerÀà
£·¡¢StringBufferÀà
£¸¡¢RandomÀà
1£®IntegerÀàµÄʹÓ÷½·¨
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(S


Ïà¹ØÎĵµ£º

Java Îļþ Util

 import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import com.paic.is.dispatch.TMPEntry;
public class FileUtil
{
public static File getFileByRelativePath(String ......

java Íâ¹Ò¡¡°´¼ü¾«Á飬¸ÐÐËȤ´ó¼ÒÒ»ÆðÀ´Ñ§Ï°¡£

 ÎÒÔÚÍæÒ»¸öÍøÒ³ÓÎÏ·µÄʱºò×ÜÊÇ°´Ò»¸ö¼ü¡£¾õ×ÅÀÛ¡£ËùÒÔ¾ÍдÁËÒ»¸ö³ÌÐò¡£
Robot r = new Robot();
// °´¼ü
r.keyPress(51);
// ÊÍ·Å
r.keyRelease(51);
ÓÃRobot Õâ¸öʵÏÖ×Ô¶¯»¯µÄÀà¾Í¿É×öµ½¡£ÊµÏÖÕâ¸öÓÎÏ·Ò»Ö±°´ÏÂÕâ¸ö¼ü×Ó¡£
Ò²¿ÉÒÔ×ö°´¼ü¾«ÁéÀàËƵÄÈí¼þ¡£µ«ÊÇÕâ¸öÀàÖ»ÄÜÓ¦Óõ±Ç°´°¿Ú¡£ÔõôÄÜ°ÑÕâ¸ö³ÌÐò¹Ì¶¨ÔÚij ......

JAVA³õѧÕß±ØÖª

 
1.     Java Ô´ÎļþÖÐ×î¶àÖ»ÄÜÓÐÒ»¸öpublicÀà,¶øÇÒÕâ¸öÀàµÄÀàÃûÒªºÍÎļþÃûÒ»ÖÂ.ÆäËûÀàµÄ¸öÊý²»ÏÞ¡£
2.    ÃæÏò¶ÔÏó³ÌÐòÉè¼ÆµÄÌØÕ÷£¨·â×°ÐÔ£©£¨¼Ì³Ð£©£¨¶à̬ÐÔ£©
3.    ½Ó¿ÚÊÇÓÉ£¨³éÏó·½·¨£©ºÍ£¨³£Á¿£©×é³ÉµÄÌØÊâÀà
4.    ÓÃstaticÐÞÊεķ½·¨Ê ......

java ´óÊýÀà


import java.io.*;
class BigInt 
{
 int a[];
 int len;
 BigInt(String str)
 {
 {
  len=str.length();
  a=new int[len];
  for(int i=0;i<len;i++) 
  {
   this.a[i]=str.charAt(i)-48;
  }
&nb ......

javaÖÐÉú³É32λËæ»úID

 Ôںܶàʱºò£¬ÎÒÃÇÐèÒª×Ô¶¯Éú³ÉÓÀÔ¶²»»áÖظ´µÄID£¬Òò´ËÎÒÃÇ»áÓõ½ÒÔϵĴúÂëÀ´ÊµÏÖ£º
×¢Ò⣺ÐèÒª¼ÓÈëÁ½¸öapacheµÄ°ü,´úÂëºÍ°üÇë´Óhttp://www.blogjava.net/afei0922/articles/129589.html ÏÂÔØ
package cn.com.cinda.rtx.state;
import org.apache.commons.id.Hex;

public class RandomCode {
pub ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ