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

java±àÂë¹æ·¶_ÉùÃ÷ºÍÓï¾ä

1.       ÉùÃ÷(Declarations)
5.1  ÿÐÐÉùÃ÷±äÁ¿µÄÊýÁ¿(Number Per Line)
ÍÆ¼öÒ»ÐÐÒ»¸öÉùÃ÷£¬ÒòΪÕâÑùÒÔÀûÓÚдעÊÍ¡£Ò༴£¬
int level; // indentation level
int size; // size of table
ÒªÓÅÓÚ£¬
int level, size;
²»Òª½«²»Í¬ÀàÐͱäÁ¿µÄÉùÃ÷·ÅÔÚͬһÐУ¬ÀýÈ磺
int foo, fooarray[]; //WRONG!
×¢Ò⣺ÉÏÃæµÄÀý×ÓÖУ¬ÔÚÀàÐͺͱêʶ·ûÖ®¼ä·ÅÁËÒ»¸ö¿Õ¸ñ£¬ÁíÒ»ÖÖ±»ÔÊÐíµÄÌæ´ú·½Ê½ÊÇʹÓÃÖÆ±í·û£º
int         level; // indentation level
int         size; // size of table
Object currentEntry; // currently selected table entry
5.2  ³õʼ»¯(Initialization)
¾¡Á¿ÔÚÉùÃ÷¾Ö²¿±äÁ¿µÄͬʱ³õʼ»¯¡£Î¨Ò»²»Õâô×öµÄÀíÓÉÊDZäÁ¿µÄ³õʼֵÒÀÀµÓÚijЩÏÈǰ·¢ÉúµÄ¼ÆËã¡£
5.3  ²¼¾Ö(Placement)
Ö»ÔÚ´úÂë¿éµÄ¿ªÊ¼´¦ÉùÃ÷±äÁ¿¡££¨Ò»¸ö¿éÊÇÖ¸Èκα»°üº¬ÔÚ´óÀ¨ºÅ"{"ºÍ"}"ÖмäµÄ´úÂë¡££©²»ÒªÔÚÊ×´ÎÓõ½¸Ã±äÁ¿Ê±²ÅÉùÃ÷Ö®¡£Õâ»á°Ñ×¢ÒâÁ¦²»¼¯ÖеijÌÐòÔ±¸ãºýÍ¿£¬Í¬Ê±»á·Á°­´úÂëÔÚÛò×÷ÓÃÓòÄڵĿÉÒÆÖ²ÐÔ¡£
void myMethod() {
int int1 = 0; // beginning of method block
if (condition) {
int int2 = 0; // beginning of "if" block
...
}
}
¸Ã¹æÔòµÄÒ»¸öÀýÍâÊÇforÑ­»·µÄË÷Òý±äÁ¿
for (int i = 0; i < maxLoops; i++) { ... }
±ÜÃâÉùÃ÷µÄ¾Ö²¿±äÁ¿¸²¸ÇÉÏÒ»¼¶ÉùÃ÷µÄ±äÁ¿¡£ÀýÈ磬²»ÒªÔÚÄÚ²¿´úÂë¿éÖÐÉùÃ÷ÏàͬµÄ±äÁ¿Ãû£º
int count;
...
myMethod() {
if (condition) {
int count = 0; // AVOID!
...
}
...
}
5.4  ÀàºÍ½Ó¿ÚµÄÉùÃ÷(Class and Interface Declarations)
µ±±àдÀàºÍ½Ó¿ÚÊÇ£¬Ó¦¸Ã×ñÊØÒÔϸñʽ¹æÔò£º
·ÔÚ·½·¨ÃûÓëÆä²ÎÊýÁбí֮ǰµÄ×óÀ¨ºÅ“(”¼ä²»ÒªÓпոñ¡£
·×ó´óÀ¨ºÅ“{”λÓÚÉùÃ÷Óï¾äͬÐеÄĩβ¡£
·ÓÒ´óÀ¨ºÅ“}”ÁíÆðÒ»ÐУ¬ÓëÏàÓ¦µÄÉùÃ÷Óï¾ä¶ÔÆë£¬³ý·ÇÊÇÒ»¸ö¿ÕÓï¾ä£¬“{”Ó¦½ô¸úÔÚ“{”Ö®ºó¡£
class Sample extends Object {
int ivar1;
int ivar2;
Sample(int i, int j) {
ivar1 = i;
ivar2 = j;
}
 
int emptyMethod() {}
...
} //·½·¨Óë·½·¨Ö®¼äÒÔ¿ÕÐзָô¡£
}
 
2.       Óï¾ä(Statements)
6.1  ¼òµ¥Óï¾ä(Simple Statements)
ÿÐÐÖÁ¶à°üº¬Ò»


Ïà¹ØÎĵµ£º

java»ù±¾Êý¾ÝÀàÐÍת»»

»ù±¾Êý¾ÝÀàÐÍ
ÔÚJAVAÖÐÒ»¹²ÓаËÖÖ»ù±¾Êý¾ÝÀàÐÍ£¬ËûÃÇ·Ö±ðÊÇ
byte¡¢short¡¢int¡¢long¡¢float¡¢double¡¢char¡¢boolean
ÕûÐÍ
ÆäÖÐbyte¡¢short¡¢int¡¢long¶¼ÊDZíʾÕûÊýµÄ£¬Ö»²»¹ýËûÃǵÄȡֵ·¶Î§²»Ò»Ñù
byteµÄȡֵ·¶Î§Îª-128~127£¬Õ¼ÓÃ1¸ö×Ö½Ú£¨-2µÄ7´Î·½µ½2µÄ7´Î·½-1£©£º¾ßÌåÇë¿´²¹Âë
shortµÄȡֵ·¶Î§Îª-32768~32767£¬Õ¼Ó ......

Android G1 JAVAÐéÄâ»ú

Blog from http://forum.xda-developers.com/showthread.php?t=552846
I've just pushed new Hero Java app into my rogers build and it works fine.
What you basically need is:
Jbed.apk (install with adb install)
libjbedvm.so (adb push /system/lib) - remember to remount as RW.
I strongly suggest to ......

Siebel Java Data Bean: Query first record

Following codes will show you how to query the first record from DB using Java Data Bean. package com ;
import com.siebel.data.*;
import com.siebel.data.SiebelException;
public class DataBeanDemo {
private SiebelDataBean m_dataBean = null;
private SiebelBusObject m_busObject = null;
......

javaµÄÁ½ÖÖ¶à̬

     1. JavaÖгýÁËstaticºÍfinal·½·¨Í⣬ÆäËûËùÓеķ½·¨¶¼ÊÇÔËÐÐʱ°ó¶¨µÄ¡£private·½·¨¶¼±»Òþʽָ¶¨ÎªfinalµÄ£¬Òò´ËfinalµÄ·½·¨²»»áÔÚÔËÐÐʱ°ó¶¨¡£µ±ÔÚÅÉÉúÀàÖÐÖØÐ´»ùÀàÖÐstatic¡¢final¡¢»òprivate·½·¨Ê±£¬ÊµÖÊÉÏÊÇ´´½¨ÁËÒ»¸öÐµķ½·¨¡£
     2.ÔÚÅÉÉúÀàÖУ¬¶ÔÓÚ»ùÀàÖеÄpr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ