0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Java解説 20250714

0
Posted at

ローカル変数

・初期化さていないローカル変数を使用するとコンパイルエラーとなる。
・配列を生成すると、データ型にあわせて初期化される。

参照型の利用

public staic void main (String[] args) {
int[] a = new int[1];
int[] b = a;
}

aが参照している配列をbも参照する。

コマンドライン引数

javaコマンド実行時にプログラムへ渡す値。
「tanaka 10 20」

c:¥ java Sample tanaka 10 20
class Sample {
 pubic static void main(String[] args) {
   System.out.println(args[0]);
   System.out.println(args[1]);
   System.out.println(args[2]);
 }
}

オラクル認定資格教科書 Javaプログラマ Bronze SE(試験番号1Z0-818)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?