java´íÌ⼯
Õý¶à±ßÐÎÖÐ×µÄ¶Ô½ÇÏß¾ÍÊÇÖ÷¶Ô½ÇÏߣ¬ÆäÓàµÄ¶Ô½ÇÏß¾ÍÊǸ±¶Ô½ÇÏß
lang ÊÇ language£¨ÓïÑÔ£© µÄ¼òд
ÊÇjavaÖг£Ó÷½·¨×î¶àµÄ°ü
°üº¬³£ÓÃÀà
Runnable½Ó¿Ú£¬Ö»ÓÐÒ»¸ö·½·¨run()
exit(int status)
ÖÕÖ¹µ±Ç°ÕýÔÚÔËÐÐµÄ Java ÐéÄâ»ú¡£
System.exit(0);
import javax.swing.JOptionPane;
public class LableTest
{public static void main(String[] args)
{String output="";
rownnext:
for (int row=1;row<=5;row++)
{ output+="\n";
for(int column=1;column<=10;column++)
{if(column>2*row-1)
continue rownnext;
output+="*";
}
}
JOptionPane.showMessageDialog(null,output,"testing continue with a label",
JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
}
ÐèÒªµ¼Èë°ü
import java.awt.Graphics£¬¹©paint(Graphics g)·½·¨ÒýÓã¬
import javax.swing.JApplet;
public class TestRow extends Japplet
1
ÔõÑùдһ¸öJava³ÌÐò¿ÉÒÔÈÃËüËæ»ú²úÉú4¸öµ¥´Ê
×÷Õߣºbeijiubeidaodi
2009-2-24 12:45 ¡¡ »Ø¸´´Ë·¢ÑÔ
4
»Ø¸´£ºÔõÑùдһ¸öJava³ÌÐò¿ÉÒÔÈÃËüËæ»ú²úÉú4¸öµ¥´Ê
ÉÏÃæµÄÁ¬Õâ¸ö¶¼²»ÖªµÀÔõô×öÂ𣬼ÈȻ֪µÀRANDOM()·½·¨¿ÉÒÔËæ»úÊý×Ö£¬¾Í²»ÖªµÀ°Ñµ¥´ÊÊÂÏÈ´æµ½Êý×éÀïÃ棬Êý×é²»ÊÇÓÃϱêÀ´±éÀúµÄÂ𣬸ù¾Ýϱ겻¾Í¿ÉÒÔËæ»úµ¥´ÊÂ𣡣¡£¡º¹¡£¡£¡£¡£×î»ù´¡µÄ¶«Î÷ÁË
ËØÊýÖ»ÐèÒª¼ÇסÄܱ»1ºÍ×ÔÉíÒÔÍâµÄÕûÊýÕû³ý¾ÍÐÐÁË£¬Àý1ºÍ×ÔÉíÒÔÍâµÄÕûµÄ±íʾ·½·¨for (i=2;i<m;i++)
APIÏëÑо¿£¬¾Í´Ólang,awt,io,netÕâËĸö°ü¿ªÊ¼£»Ïë²éÔÄ£¬¾Í¸ù¾ÝÀàÃûºÍËüµÄλÖÃÕÒ£¬ÁíÍ⻹ҪעÒâһЩ¶«Î÷¿
Ïà¹ØÎĵµ£º
1. ¶Ô×Ô¼ºµÄ×ܽáºÍÀí½âµÄÉý»ªÊÇÎÒϲ»¶×öµÄÒ»¼þÊ£¬ÔÚʵ¼ÊÏîÄ¿¹ý³ÌÖУ¬ºÜ¶àµØ·½¶¼Óõ½¶¯Ì¬Éú³ÉÊ÷Ðβ˵¥µÄµØ·½£¬ÏÖÔھ͸ø´ó¼Ò½²½²ÈçºÎ¶¯Ì¬Éú³ÉÒ»¿ÃÊ÷¡£
2. Ê×ÏÈÎÒÃDZØÐëÒª½¨Á¢Ê÷µÄ½ÚµãÄ£ÐÍ£¬ÆäʵÊ÷µÄ½ÚµãÄ£ÐÍÖÐÍùÍù¾ÍÊÇÎÒÃÇÐèÒª´æ·ÅµÄÊý¾Ý¶ÔÏó£¬ºÜ ......
¶¯Ì¬¹¹½¨Ê÷µÄÄ£Ðͺͷ½·¨£º
/**
* ¸ÃÄ£¿éÖ÷ÒªÊǽ«ÎÞ¹æÔò´æ·ÅµÄ¶ÔÏó½øÐÐÒ»¸öÓÐ×éÖ¯µÄÊ÷Ðνڵ㴦Àí
* @author ÏļҼª<jijin0223@126.com>
*
*/
public class SystemMenuTreeModel {
public SystemMenuTreeModel(){
& ......
×î½ü¾³£ºÍ¹«Ë¾×öJAVAµÄÐÖµÜÃÇ´ò½»µÀ£¬ÓÉÓÚÐèҪͳ¼ÓÃÜËã·¨£¬ËùÒÔÒªÇó×öÒ»¸ö¼ÓÃܵÄDLLÎļþ¹©ÐÖµÜÃǵ÷Ó㬸ù¾ÝÍøÉϸ÷λ´óϺÃǵľÑ飬ÔÚ¼ÓÉϸöÈËÔÚÃþË÷¹ý³ÌÖеÄÌå»á£¬ÏÖÔÚ½«Á÷³ÌÒÔ¼°¸öÈËÐĵÃÌùÉÏ£¬ÒÔ¹©ÒÔºóÂþÂþ³ÌÐòÉúÑIJο¼£¬ÈçÓв»¶ÔµÄ»¹Çë¸÷λ´óÁ¦Ö¸Õý¡£
µÚÒ»²½ÊDZàдjavaÀ࣬ ......
ÒòÊý¾Ý°²È«£¬ÐèÒª½«Éú³ÉµÄ±¨±íxls£¬Ìí¼Óˮӡ,ËùÒÔ×ÔÒÑÔÚjxlÖнøÐдúÂëÐ޸ġ£
ʹÓÃÀý×Ó
public class testJxl {
public static void main(String[] args) throws Exception {
OutputStream out = new FileOutputStream("./aaaa.xls"); // дÈëµ½FileInputStream
WritableWorkbook wwb= Workbook.createWorkbook(out);
......
ʹÓÃjava.lang.MathÀ࣬Éú³É500¸ö0~99µÄËæ»úÊý£¬½øÐÐÅÅÐòÊä³ö£¬²¢Çó×î´óÖµ¡¢×îСֵ¡¢Æ½¾ùÖµ¡¢±ê×¼²î¡¢·½²î¡¢¾ù·½²î£»
import java.lang.Math;
import java.util.Arrays;
public class Main {
public static void main(String args[]) {
//create random
int [] data =new int[500];
double sum = 0, avg =0; ......