1 / 6

Java 入門

Java 入門. 1 . 16多次元配列 1 . 17Javaキーワード 紺野憲一. 1.16 多次元配列. ・ 2 次元配列の指定は type Name[][] ; ・領域を作成する場合は Name = new type[size1][size2] ; ・同時に行いたい時は type Name[][] = new type[size1][size2] ;. 配列の初期化.  変数の作成と初期化を同時に行う時には以下の形式で行えます。 type Name[][] = {{e00,e01, ・・・・ ,e0n}, {e10,e11, ・・・・ ,e1n},

Download Presentation

Java 入門

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java入門 1.16多次元配列 1.17Javaキーワード 紺野憲一

  2. 1.16多次元配列 ・2次元配列の指定は typeName[][]; ・領域を作成する場合は Name=new type[size1][size2]; ・同時に行いたい時は type Name[][]=new type[size1][size2];

  3. 配列の初期化  変数の作成と初期化を同時に行う時には以下の形式で行えます。 type Name[][]={{e00,e01,・・・・,e0n}, {e10,e11,・・・・,e1n},         ・・・・・・・・ {em0,em1,・・・,emn}};

  4. 配列の長さの取得 ・配列の長さの取得     s=Name.length;   ・配列の要素の長さの取得     s=Name[m].length;   mは要素の指定、この場合m行

  5. 1.17 Javaキーワード javaでは特定は文字をキーワードとして認識されます。 例)returnintif Javaでは大文字と小文字が区別される。 キーワードと同じ名前を変数名などには用いる事は出来ない。

  6. 宿題 • 独習javaのP38のプログラムを自分で作ってみる。

More Related