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

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;
  }
 }
 }
 public BigInt bigplus(BigInt b) 
 {
  BigInt sum;
  int l;
  int m=len-1;
  int n=b.len-1;
  int max;
  if(len>=b.len)
  {
   l=b.len;
   max=len-1;
   sum=this;
  }
  else
  {
   l=len;
   sum=b;
   max=b.len-1;
  }
  for(int i=0;i<l;i++) 
  {
    sum.a[max]=a[m]+b.a[n];
    if(max!=0&&sum.a[max]>=10)
    {
     sum.a[max]=sum.a[max]-10;
     sum.a[max-1]++;
    }
    m--;
    n--;
    max--;
  }
  return sum;
  }
  public void output()
  {
 for(int i=0;i<len;i++)
 {
  System.out.print(a[i]);
 }  
  }
}
class TestBig
{
 public static void main(String[] args) throws IOException
 {
String str1;
String str2;
System.out.println("ÇëÊäÈë´óÊý1:");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
str1=br.readLine();
System.out.println("ÇëÊäÈë´óÊý2:");
BufferedReader br1=new BufferedReader(new InputStreamReader(System.in));
str2=br1.readLine();
 

 BigInt a1=new BigInt(str1);
 BigInt a2=new BigInt(str2);
 BigInt a3=a1.bigplus(a2);
      a3.output();
 }
}


Ïà¹ØÎĵµ£º

Java Ïß³ÌÖмǼÈÕÖ¾

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
public class ThreadLog
{
private final static String _detailLogFile = "log"+File.separator+"detail";
private static boolean _logFlag = true;
priv ......

Java XML µÄ Util

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
public class DocumentUtil
{
public static Document loadXMLByAbsolutePath(String absoluteFilePath, String logFileName)
{
SAXReader saxReader = new SAXReader();
Document document = null;
try ......

Java ʱ¼ä·¶Î§ Util

 import java.util.Date;
public class TimeSpan
{
public final static TimeSpan ZERO = new TimeSpan(0);

private long _totalMilliSeconds = 0;

public TimeSpan(long totalMilliSeconds)
{
_totalMilliSeconds = totalMilliSeconds;
}

public TimeSpan(Date afterDate, Date beforeDat ......

ÔÚJavaÓ¦ÓóÌÐòÖÐʹÓÃJfreechartÅäÖÃ[z]

ÕªÒª£º±¾ÎĽ«Ì¸Ì¸ÔÚJavaÓ¦ÓóÌÐòÖÐʹÓÃJfreechartÅäÖã¬JFreeChartÊÇÓÃJava¿ª·¢µÄÒ»¸öÃâ·ÑµÄchartͼÐδ¦ÀíÀà¿â¡£
²âÊÔ»·¾³£º
OS¡¡£ºWindowsXP
Java£ºjdk1.5.0_06
JFreeChart£º1.0.9£¨2008Äê3Ô¡¡×îа汾£©
ÒòΪJFreeChart²ÉÓÃJava¿ª·¢¶ø³É£¬ËùÒÔÔÚÆäËûϵͳҲÄÜÕý³£ÔËÐС£
JFreeChartµÄ°²×°
1£¬ÏÂÔØ
´ÓSourceforge. ......

JAVA³õѧÕß±ØÖª

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