java »ñÈ¡½ñÌìÐÇÆÚ¼¸
package com;
import java.util.*;
public class WhatDay {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
c.setTime(new Date(System.currentTimeMillis()));
int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);
switch (dayOfWeek) {
case 1:
System.out.println("ÐÇÆÚÈÕ");
break;
case 2:
System.out.println("ÐÇÆÚÒ»");
break;
case 3:
System.out.println("ÐÇÆÚ¶þ");
break;
case 4:
System.out.println("ÐÇÆÚÈý");
break;
case 5:
System.out.println("ÐÇÆÚËÄ");
break;
case 6:
System.out.println("ÐÇÆÚÎå");
break;
case 7:
System.out.println("ÐÇÆÚÁù");
break;
}
}
}
Ïà¹ØÎĵµ£º
1. ÒýÑÔ
1.1. ±àдĿµÄ
±¾ÎĵµÎª***Èí¼þÏîÄ¿¿ª·¢ÖÐJava±àÂ빤×÷ÌṩÁËÒ»¸ö¿É×ñѵĹ淶±ê×¼£¬Í¨¹ý±¾¹æ·¶µÄʹÓÿÉÒÔ½øÐиüÓÐЧµÄÉè¼Æ±àÂë¹æ·¶¹ÜÀí£¬ ʹµÃ×îÖÕµÄÈí¼þ²úÆ·¾ßÓÐÁ¼ºÃµÄÉè¼Æ½á¹¹ºÍͳһµÄ´úÂë·ç¸ñ£¬ÇÒ´úÂë¾ßÓпɶÁÐÔÇ¿¡¢Ò×ά»¤µÈÌص㡣
Öƶ¨±¾±à³Ì¹æ·¶µÄÄ¿µÄÊÇΪÁËÌá¸ßÈí¼þ¿ª·¢Ð§Âʼ°Ëù ......
ÔÚjavaÈç¹ûÒ»¸ö³ÉÔ±±»ÉùÃ÷Ϊstatic£¬Ëü¾ÍÄܹ»ÔÚËüµÄÀàµÄÈκζÔÏó´´½¨Ö®Ç°±»·ÃÎÊ£¬¶ø²»±ØÒýÓÃÈκζÔÏó¡£Äã¿ÉÒÔ½«·½·¨ºÍ±äÁ¿¶¼ÉùÃ÷Ϊstatic¡£static ³ÉÔ±µÄ×î³£¼ûµÄÀý×ÓÊÇmain( ) ¡£ÒòΪÔÚ³ÌÐò¿ªÊ¼Ö´ÐÐʱ±ØÐëµ÷ÓÃmain() £¬ËùÒÔËü±»ÉùÃ÷Ϊstatic¡£
ÓÐʱÄãÏ£Íû¶¨ÒåÒ»¸öÀà³ÉÔ±£¬Ê¹ËüµÄʹÓÃÍêÈ«¶ÀÁ¢ÓÚ¸ÃÀàµÄÈκζÔÏó¡£Í¨³ ......
/**
* ¶ÑÅÅÐò
*
* */
public void heapSort(double[] a){
double temp;
initCreateHeap(a);
for(int i = a.length - 1; i > 0; i --){
temp = a[0];
a[0] = a[i];
a[i] = temp;
createHeap(a, i, 0);
}
}
/**
* ½«Êý×é¿´³ÉÍêÈ«¶þ²æÊ÷£¬½¨Á¢×î´ó¶Ñ
* */
private ......
//** **********´´½¨¹¤×÷²¾************ */
WritableWorkbook workbook = Workbook.createWorkbook(new File("d:/test.xls"));
/** *//** **********´´½¨¹¤ ......