1
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から学習をはじめた初心者の備忘録です。

1. 変数宣言

Java:変数宣言時に型指定する
Python:変数宣言時の型指定は不要

2. 標準入力

Java:new Scanner(System.in);
Python:input()

3. 条件式

//Java
if (条件式){
    処理
} else if (条件式) {
    処理
} else {
    処理
}

Javaでの文字列の比較は
文字列型の変数 .equals (比較相手の文字列)

#Python
if 条件式 :
    処理
elif 条件式 :
    処理
else:
    処理

4. ループ処理

//Java
for (int i = 0; i < ループ回数; i++){
    処理
}
#Python
for i in range(ループ回数):
    処理

5. その他

Javaは文末に必ず ; が必要
Pythonで変数をに格納した数値を使用する際、型指定が必要

スクールでも学習予定だがJavaよりPythonの方が好きかもしれない

1
0
2

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
1
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?