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

java³ÌÐò~ÌìÊý


//ÊäÈëijÄêijÔÂijÌ죬Êä³öÕâÒ»ÌìÊÇÕâÒ»ÄêµÄµÚ¼¸Ìì
public class DaySum {
 public static void main(String[] args)
 {
  date da=new date();
  System.out.println(da.count(2008,12,31));
 }
 
}
class date
{
 int count(int  year,int month,int day)
 {
  int sum=0;
  if(month>0)
  {
   sum+=day;
  }
  if(month>1)
  {
   sum+=31;
  }
  if(month>2)
  {
   if(RunNian(year))
   {
    sum+=29;
   }
   else
   {
    sum+=28;
   }
  }
  if(month>3)
  {
   sum+=31;
   
  }
  if(month>4)
  {
   sum+=30;
   
  }
  if(month>5)
  {
   sum+=31;
   
  }
  if(month>6)
  {
   sum+=30;
   
  }
  if(month>7)
  {
   sum+=31;
  }
  if(month>8)
  {
   sum+=31;
   
  }
  if(month>9)
  {
   sum+=30;
   
  }
  if(month>10)
  {
   sum+=31;
   
  }
  if(month>11)
  {
   sum+=30;
   
  }
  return sum;
  
  
 }
 public boolean RunNian(int year)
 {
  
  if(year%4==0)
  {
   
   return true;
  }
  if(year%400==0&&year%100==0)
&


Ïà¹ØÎĵµ£º

Java СÈÕÀú¸ñʽÊä³ö ÈòÄê¼ÆËã

2010-04-26 22:36
import java.util.Scanner;
public class _calendar {
public static void main(String[] args) {
   // TODO Auto-generated method stub
   System.out.println("ÇëÊäÈëÄê·Ý£º");
   Scanner sc = new Scanner(System.in);
   int year = sc.nextInt(); ......

5.5±Ê¼Ç java»ù´¡ÔöÇ¿

½ñÌìÊÇÀ´´«ÖDz¥¿ÍµÄµÚÒ»Ì죬ÐÒ¿÷֮ǰ¿´¹ýthinking in java ¸Ð¾õÀí½â²»ÊǺܳÔÁ¦£¬µ«ÊǸоõͦÀÛµÄ
1¡£Íâ¹Ò²å¼þµÄ²½Ö裺
1£¬ÔÚeclipseµÄĿ¼Ï½¨Á¢linksĿ¼¡£
2£¬ÔÚlinksĿ¼Ï£¬½¨Á¢Ò»¸öÎļþ£¬ÄÚÈÝΪ²å¼þeclipseĿ¼µÄ¸¸Ä¿Â¼£»
 path=²å¼þeclipseĿ¼µÄ¸¸Ä¿Â¼  path=F:\\Eclipse\\NLpack1-eclipse-SDK-3.2.1-w ......

java·´Éä»úÖÆ

ת×Ô http://www.bjtarena.com/html/2010/4/1058.htm
ºÜ¶àÅóÓÑÔÚÉîÈëµÄ½Ó´¥JavaÓïÑÔºó¾Í»á·¢ÏÖÕâÑùÁ½¸ö´Ê£º·´Éä(Reflection)ºÍÄÚÊ¡(Introspector)£¬¾­³£¸ã²»Çå³þÕâµ½µ×ÊÇÔõô»ØÊ£¬ÔÚʲô³¡ºÏÏÂÓ¦ÓÃÒÔ¼°ÈçºÎʹÓã¿
¡¡¡¡·´Éä
¡¡¡¡Ïà¶Ô¶øÑÔ£¬·´Éä±ÈÄÚÊ¡¸üÈÝÒ×Àí½âÒ»µã¡£ÓÃÒ»¾ä±È½Ï°×µÄ»°À´¸ÅÀ¨£¬·´Éä¾ÍÊÇÈÃÄã¿ÉÒÔͨ¹ýÃû³ÆÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ