JAVA编程规范V1.1(3)

时间:2025-07-13

JAVA编程规范V1.1

1 JAVA编程规范

1.1JAVA CODING规范

1.1.1

格式

编排

所有的编排使用四个“空格”,不要使用“Tab”;比如:

void foo() {

while ( bar > 0 ) {

System.out.println(); bar-- ; }

if ( oatmeal == tasty ) {

System.out.println("Oatmeal is good and good for you"); }

else if ( oatmeal == yak ) {

System.out.println("Oatmeal tastes like sawdust"); } else {

System.out.println("tell me pleeze what iz dis 'oatmeal'"); }

switch( suckFactor ) {

case 1:

System.out.println("This sucks"); break; case 2:

System.out.println("This really sucks"); break; case 3:

System.out.println("This seriously sucks"); break; default:

System.out.println("whatever");

JAVA编程规范V1.1(3).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219