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

JAVA´óÊýÔËËã

ÓÐÒ»µÀÕâÑùµÄ±ÊÊÔÌ⣬¶ÔÓÚ³õѧÕß¿ÉÄÜÓÐЩÄѶȣº
ÓÃJAVA ʵÏÖËãÊõ±í´ïʽ(1234324234324 + 8938459043545)/5 + 343434343432.59845
ÒòΪJAVAÓïÑÔÖеÄlong ¶¨ÒåµÄ±äÁ¿ÖµµÄ×î´óÊýÊܵ½ÏÞÖÆ£¬ÀýÈç123456789987654321ÕâÑùµÄÕûÊý¾Í²»ÄÜ´æ·ÅÔÚlongÀàÐ͵ıäÁ¿ÖУ¬Èç¹ûÕâÑùÁ½¸ö´óÊýÏà¼Ó»òÏà³Ë£¬²úÉúµÄ½á¹û»á¸ü´ó¡£±ÈÈ磬JAVAÓïÑÔÖÐÈç¹ûʹÓÃlong l = 1000000000ÕâÑù¶¨Òåû´í£¬µ«Èç¹û¼ÓÉÏ2000000000±ä³É 1000000000+2000000000²âÊÔ½á¹û¾ÍΪ-1294967296£¬ ³ÉÁ˸ºÊý¡£Ô­Òò¾ÍÊǽá¹ûÊýÌ«´ó£¬ÎÞ·¨±íʾ´Ë½á¹ûÊý¡£ÄÇôÔõÑù×ö²ÅÄÜ°ÑÉÏÊö¼ÆËãÌâ¸ø½â´ð³öÀ´ÄØ£¿
ÕâÀïÎÒÃDzÉÓÃÕóÁз¨£¬±ÈÈç
long  a = 123456789876
long  b = 123412341234
Ê×ÏÈÎÒÃÇ¿ÉÒÔ¶¨Òå¶þ¸öÊý×飬·Ö×é´æ·ÅÕâЩÊý×Ö
long ary_a[3];
long ary_b[3];
¿ÉÒÔ°ÑÕâÁ½¸öÊý·Ö±ð·Ö½âΪÈý¸ö²¿·Ö£¬Ã¿¸ö²¿·Ö¶¼ÊÇËÄ룬Ҳ¾ÍÊÇ£º
ary_a [0] = 1234;
ary_a [1] = 5678;
ary_a [2] = 9876;
ary_b [0] = 1234;
ary_b [1] = 1234;
ary_b [2] = 1234;
½ÓÏÂÀ´µÄÊÂÇé¾ÍÊǽøλÁË
À´Ò»¸öСµãµÄÊý£¬±ÈÈç 38 + 25 ·Ö½âÒ»ÏÂ
¸öλÏà¼Ó 8+5=13 Ðè½øλ , ½á¹ûµÄ¸öλΪ3
ʮλÏà¼Ó 1+3+2 = 6
¿ÉÒԵõ½Ò»¸ö¹æÂÉ
½øλÊý = 13 / 10
¸öλËùÁôÏÂÀ´µÄλ = 13 % 10
³ÌÐòÖÐÈçÏÂʵÏÖ
public class Test1 {
public static void main(String[] args) {
int a = 38;
int b = 25;

int[] ary_a = {3, 8};
int[] ary_b = {2, 5};

int r_1 = ary_a[0] + ary_b[0];
int r_2 = ary_a[1] + ary_b[1];

/* r_1 = 5, r_2 = 13 */
System.out.println(r_1);
System.out.println(r_2);

/* ½á¹ûµÄ½øλ */
int carry = r_2 / 10;
System.out.println(carry);

/* ½á¹ûµÄ¸öλ */
int g = r_2 % 10;
System.out.println(g);

/* ʮλ */
int s = carry+r_1;
System.out.println(s);

/*½á¹ûΪ63*/
System.out.println(s+""+g);

}
}

Èç¹ûÊÇÈýλÊý£¬ÒÔ´ËÀàÍÆ
ÏÂÃæ¸ø³ö¼òµ¥Ê¾Àý
package com;
public class BigNumberOperation {

/*¼Ó·¨*/
public int[] add(int[] f, int[] s, int n) {

/*¶¨ÒåÓàÊý£¬³õʼΪ0*/
int carry = 0;

/*¶¨Òå·µ»ØµÄÊý×é*/
int[] c = new int[f.length];
/*±éÀú´«ÈëµÄÁ½¸öÊý×飬·Ö±ð¼ÆËã*/
for(int i = f.length - 1; i >= 0; i--) {


Ïà¹ØÎĵµ£º

¼ÌÐø Âþ̸Java¼ÓÃܼ¼Êõ£¨Ò»£©

  HMAC
    HMAC£¨Hash Message Authentication Code£¬É¢ÁÐÏûÏ¢¼ø±ðÂ룬»ùÓÚÃÜÔ¿µÄHashËã·¨µÄÈÏ֤ЭÒé¡£ÏûÏ¢¼ø±ðÂëʵÏÖ¼ø±ðµÄÔ­ÀíÊÇ£¬Óù«¿ªº¯ÊýºÍÃÜÔ¿²úÉúÒ»¸ö¹Ì¶¨³¤¶ÈµÄÖµ×÷ΪÈÏÖ¤±êʶ£¬ÓÃÕâ¸ö±êʶ¼ø±ðÏûÏ¢µÄÍêÕûÐÔ¡£Ê¹ÓÃÒ»¸öÃÜÔ¿Éú³ÉÒ»¸ö¹Ì¶¨´óСµÄСÊý¾Ý¿é£¬¼´MAC£¬²¢½«Æä¼ÓÈëµ½ÏûÏ¢ÖУ¬È»ºó´«Êä¡ ......

Java 7.0µÄ±ä»¯

1.¶ÔcollectionsµÄÖ§³Ö 
Java´úÂë
List<String> list = new ArrayList<String>();   
list.add("item");  
String item = list.get(0);     
Set<String> set = new HashSet<String>(); &nb ......

Core Java Diaries

                                       Ïß³Ì
1---Ëø¶ÔÏóµÄ·½·¨----obj.wait()----obj.notify()----Õë¶Ôµ±Ç°Ïß³Ì
& ......

JAVAÖеÄλÒƲÙ×÷ >> >>

ÖÐС
JavaÖй²ÓÐÈý¸öÒÆλ²Ù×÷·û£¬·Ö±ðÊÇ£º
<<£º×óÒƲÙ×÷£¬ËùÓвÙ×÷ÊýÏò×óÒƶ¯£¬Ã¿ÒÆһλ×îÓÒ±ßÓÃ0²¹³ä
>>£º´ø·ûºÅλÓÒÒÆ£ºÁ¬Í¬·ûºÅλһÆðÓÒÒÆ£¬Ã¿ÒÆһλ×î×ó±ßÓ÷ûºÅλ²¹³ä
>>>£ºÎÞ·ûºÅÓÒÒÆ£ºÁ¬Í¬·ûºÅλһÆðÓÒÒÆ£¬Ã¿ÒÆһλ×î×ó±ßÓÃ0²¹³ä
ÒÆλ²Ù×÷·ûÖ»ÄÜ×÷ÓÃÓÚÕûÊýÀàÐÍ£¬¼´byte£¬short£¬char£¬i ......

JavaÅäÖÃÎļþ¶ÁÈ¡

JavaÅäÖÃÎļþ¶ÁÈ¡Óи÷ÖÖ²»Í¬µÄÎļþ£¬µ«ÊÇÓÉÓÚ´ò°üJarºóµÄ·¾¶¸Ä±ä£¬ÍùÍùÔÚÏîÄ¿ÖÐÄÜÕýÈ·¶ÁÈ¡µÄÅäÖÃÎļþÔÚJarºó±ä³ÉÎļþ²»´æÔڵı­¾ß£¬ÏÂÔÚÌá³ö¼¸¸÷²»Í¬µÄÅäÖÃÎļþ¶ÁÈ¡·½Ê½£¬½ö¹©²Î¿¼
Ò»¡¢Ö±½ÓÎļþ¶ÁÈ¡
File f = new File("you config file path");
FileReader fr = new FileReader(f);
BufferReader br = new ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ