コーディング基準.PDF



Similar documents
新・明解Java入門

Java演習(4) -- 変数と型 --

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

8 if switch for while do while 2

解きながら学ぶJava入門編

K227 Java 2

1: JX-model XML File Package Import Class Intf Ctor Method SInit Field Param Local ExtdOpt ImplOpt ThrwOpt Members QName Type Stmt Label Expr ident li

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1

Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲

JavaプログラミングⅠ

PowerPoint Presentation

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 条件判断文 3 switch 文 switch 文式が case の値と一致した場合 そこから直後の break; までを処理し どれにも一致しない場合 default; から直後の break; までを処理する 但し 式や値 1

I java A

(Eclipse\202\305\212w\202\324Java2\215\374.pdf)

-34-

Thread

ALG ppt

untitled

放射線専門医認定試験(2009・20回)/HOHS‐01(基礎一次)

I. (i) Java? (A). 2Apples (B). Vitamin-C (C). Peach21 (D). Pine_Apple (ii) Java? (A). Java (B). Java (C). Java (D). JavaScript Java JavaScript Java (i

Java学習教材

JavaプログラミングⅠ

VB.NETコーディング標準

untitled

Condition DAQ condition condition 2 3 XML key value

アルゴリズムとデータ構造1

break 文 switch ブロック内の実行中の処理を強制的に終了し ブロックから抜けます switch(i) 強制終了 ソースコード例ソースファイル名 :Sample7_1.java // 入力値の判定 import java.io.*; class Sample7_1 public stati

" " " " "!!

: : : TSTank 2

10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) / 10

Java 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A

r02.dvi

226

ohp02.dvi

アルゴリズムとデータ構造1

1 Java Java GUI , 2 2 jlabel1 jlabel2 jlabel3 jtextfield1 jtextfield2 jtextfield3 jbutton1 jtextfield1 jtextfield2 jtextfield3

問題1 以下に示すプログラムは、次の処理をするプログラムである

Prog2_9th

PowerPoint プレゼンテーション

Quick Sort 計算機アルゴリズム特論 :2017 年度 只木進一

SystemC言語概論

IE6 2 BMI chapter1 Java 6 chapter2 Java 7 chapter3 for if 8 chapter4 : BMI 9 chapter5 Java GUI 10 chapter6 11 chapter7 BMI 12 chap

データ構造とアルゴリズム論

2: 3: A, f, φ f(t = A sin(2πft + φ = A sin(ωt + φ ω 2πf 440Hz A ( ( 4 ( 5 f(t = sin(2πf 1t + sin(2πf 2 t = 2 sin(2πt(f 1 + f 2 /2 cos(2πt(f 1 f

アプレットの作成

明解Javaによるアルゴリズムとデータ構造

Java updated

JAVA H13 OISA JAVA 1

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =


£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

一般演題(ポスター)

I. (i) Foo public (A). javac Foo.java java Foo.class (C). javac Foo java Foo (ii)? (B). javac Foo.java java Foo (D). javac Foo java Foo.class (A). Jav

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版   None

19 3!! (+) (>) (++) (+=) for while 3.1!! (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics;

1_cover

10K pdf

Prog1_10th

fp.gby

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

Java プログラミング Ⅰ 3 回目変数 変数 変 数 一時的に値を記憶させておく機能型 ( データ型 ) と識別子をもつ 2 型 ( データ型 ) 変数の種類型に応じて記憶できる値の種類や範囲が決まる 型 値の種類 値の範囲 boolean 真偽値 true / false char 2バイト文

1: Preference Display 1 package sample. pref ; 2 3 import android. app. Activity ; 4 import android. content. Intent ; 5 import android. content. Shar

!!!!!

Javaハンドブック

Microsoft PowerPoint ppt


ex01.dvi

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

日本内科学会雑誌第98巻第3号

r3.dvi

Microsoft PowerPoint - ●SWIM_ _INET掲載用.pptx

6 p.1 6 Java GUI GUI paintcomponent GUI mouseclicked, keypressed, actionperformed mouseclicked paintcomponent thread, 1 GUI 6.0.2, mutlithread C

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2:

P03.ppt

第52回日本生殖医学会総会・学術講演会

ワークショップ テスト駆動開発

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版  

ex01.dvi

yakuri06023‡Ì…R…s†[

Java講座

SystemC 2.0を用いた簡易CPUバスモデルの設計

目 次 Java GUI 3 1 概要 クラス構成 ソースコード例 課題...7 i

TopLink å SampleClient.java... 5 Ò readallsample() querysample() cachesample() Ç..

JEB Plugin 開発チュートリアル 第4回


プログラミングA

jigp60-★WEB用★/ky494773452500058730

プログラム

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a

Microsoft Word - keisankigairon.ch doc



Programming-C-9.key


問題1 以下に示すプログラムは、次の処理をするプログラムである

Java (7) Lesson = (1) 1 m 3 /s m 2 5 m 2 4 m 2 1 m 3 m 1 m 0.5 m 3 /ms 0.3 m 3 /ms 0.6 m 3 /ms 1 1 3

Transcription:

Java Java Java Java.java.class 1 private public package import / //////////////////////////////////////////////////////////////////////////////// // // // // //////////////////////////////////////////////////////////////////////////////// ( ) //////////////////////////////////////////////////////////////////////////////// // T21_1 Turtle // 1 // (2004 4 1 12 34 ) // //////////////////////////////////////////////////////////////////////////////// -1-

package net import ) jp com edu ASCII com edu gov mil net org ISO 3166 1981 2 import API java.awt.color Extension API javax.swing.jbutton API com.sun.j2see.blueprints.cart.model.item API jp.ac.kansai-u.iecs.myclass / / class/interface (static) public protected private public protected private static ( ) ////////////////////////////////////////////////////////////////////// // Abc // // 09-999 (2004 4 1 12 34 ) // ////////////////////////////////////////////////////////////////////// public class Abc { // static public int dumystpb_; static protected int dumystprt_; static private int dumystprv_; // public int dumypb_; protected int dumyprt_; private int dumyprv_; // public // protected // private // public // protected // private // Abc(int x){ this.dumypb_= x; // void printout( ){ System.out.println(this.dumyPb_); // static void printclassname( ){ System.out.println( This class is + Abc ); -2-

a b c d (1) /* */ /* */ ( ) /* abcdefg hijklmn oprs */ (2) // // // ( ) if (foo > 1) { // ( ) x=x+y; else { return false; // /*************************/ /* */ /************************/ /////////////////////////// // // ////////////////////////// -3-

if ( ) { /* */ if (a == 2) { return true; else { return isprime(a); /* */ // a 4 TAB TAB 8 4 ( ) 4 1 80 40 A4 20mm Courier New 10pt Words 1 1 ( A A ( ) B B A x = a + (b + c); a + (b + c) (b + c) ) 2 8-4-

somemethod(longexpression1, longexpression2, longexpression3, longexpression4, longexpression5); // var = somemethod1(longexpression1, // somemethod2(longexpression2, // longexpression3)); // 2 ( ) longname1 = longname2 * (longname3 + longname4 - longname5) + 4 * longname6; longname1 = longname2 * (longname3 + longname4 - longname5) + 4 * longname6; //() 2 2 3 1 8 // somemethod(int anarg, Object anotherarg, String yetanotherarg, Object andstillanother) {... // 2 8 private static synchronized horkinglongmethodname(int anarg, Object anotherarg, String yetanotherarg, Object andstillanother) {... if 4 8 // if ((condition1 && condition2) (condition3 && condition4 // (4 )!(condition5 && condition6)) { // (4 ) dosomethingaboutit(); // // 1 if ((condition1 && condition2) (condition3 && condition4) // (8 )!(condition5 && condition6)) { // (8 ) dosomethingaboutit(); // 4-5-

// 2 if ((condition1 && condition2) (condition3 && condition4)!(condition5 && condition6)) { // (8 ) dosomethingaboutit(); // 4 3 alpha = (alongbooleanexpression)? beta : gamma; else alpha = (alongbooleanexpression)? beta : gamma; alpha = (alongbooleanexpression) //? beta : gamma; UpperAndLowerCase InterfaceNameImpl Impl firstwordlowercase( ) firstwordlowercase trailingunderscore_ _ UPPER_CASE_WITH_UNDERSCORE _ UpperAndLowerCase AbstractInterfaceName Abstract + ClassNameEndsWithException Exception ReallyLongClassNameEndsWithEx Ex lowercase 1 ( ) int level size /* */ int a b[] /* */ -6-

String username; // String aaa; // Object currententry; // 1 int level; // int size; // "{" "" void mymethod() { int int1 = 0; // int1 int int2; // int2 // int2 if (condition) { int2 = 0; // if int2... void mymethod() { int int1 = 0; // int1 if (condition) { int int2 = 0; // if int2... // int2 if 1 Java for for (int i = 0; i < maxloops; i++)... -7-

Java "(" "{" 1 "" "{" class Sample extends Object { int ivar1; int ivar2; Sample(int i, int j) { // ivar1 = i; ivar2 = j; // int emptymethod() { //... 1 1 argv++; // argc--; // argv++; argc--; // "{" "" 1 "{" "" if-else for 1 { { return ( ) return ( ) // return; return value; return mydisk.size(); -8-

// return (1); return (value); if if-else if else-if else if-else [ ] if ( ) { [ ] if ( ) { else { [ ] if ( ) { else if ( ) { else{ if { if ( ) // { if ( ) { // for for for ( ; ; ) { for for ( ; ; ){ // ( )for for ( ; ; ) ; for ( ; ; ) ; for ( ; ; ){ for, 3 for for for ( ) for (expr1; expr2; expr3) // ; -9-

while while while ( ) { while while ( ){ // 3 while ( ) ; while ( ) ; while ( ) { do-while do-while do { ; while ( ); switch switch switch ( ) { case ABC: /* */ // break case DEF case DEF: break; // break switch case XYZ: break; default: break; case break case ( ) break /* */ switch default default break case break -10-

try-catch try-catch try { ; catch (ExceptionClass e) { try-catch try finally try { catch (ExceptionClass e) { finally { 2 1 1 ( ) ( ) Java ( while, for, if ) 1 while (true) { // while... "(" ( ) for (i=0; i<10; i++){ // (for ) x= sin(30.0*math.pi/180.0); // (sin ) -11-

, 1 ( ) Turtle m= new Turtle(200, 200, 180);. "++" "--" ( ) a += c + d; //a,c,d a = (a + b) / (c * d); //a, c d while (d++ = s++) { n++; printsize("size is " + foo + " n"); for ( ) for (expr1; expr2; expr3) // ; ( ) ( ) mymethod((byte)anum, (Object)x); // (byte) mymethod((int)(cp + 5), ((int)(i + 3)) + 1); Java public ( private ) public ( ) static static classmethod(); // ( ) AClass.classMethod(); //. ( ) anobject.classmethod(); //. ( ) for -1 0 1 1 ( ) foobar.fchar = barfoo.lchar = 'c'; // -12-

( ) if ((c++ = d++)!= 0) {... // ( ) ( ) d = (a = b + c) + r; a = b + c; d = a + r; ( ) () // a==b && if (a == b && c == d) // a==b c==d && if ((a == b) && (c == d)) ( ) ( ) if ( ) { return x; return y; if ( ) { return x; else{ return y; -13-

Java < > /////////////////////////////////////////////////////////////////////////////// // < ( ) > // ABC // < > // 03-999 (2004 4 1 12 34 ) // /////////////////////////////////////////////////////////////////////////////// package sample; import java.awt.*; //<package ( )> //< import > ( ) // ( ) public class Abc { /* <1 > */ static public int dumystpb_; // public < // > // < > static protected int dumystprt_; // protected static private int dumystprv_; // private // < > // < ( ) > public int dumypb_; // public protected int dumyprt_; // protected private int dumyprv_; // private /**********************************************************/ /* < > */ /* < > */ /*********************************************************/ Abc(int x){ this.dumypb_= x; ////////////////////////////////////////////////////////// // < > // // < > // ////////////////////////////////////////////////////////// void printout( ){ System.out.println( this.dumypb_); /****************************************************************/ /* */ /* < // /* */ > */ /***************************************************************/ static void printclassname( ){ System.out.println( This class is + ABC ); [1] Java http://www.tcct.zaq.ne.jp/ayato/programming/java/codeconv_jp/index.html -14-

-15-2004 5 13