18
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Java、Python、JavaScriptでよく使われる構文や機能を比較した表

Last updated at Posted at 2022-12-29

Java 、 Python 、 JavaScriptでよく使われる構文や機能を比較した表

Java Python JavaScript
public class class class
class class class
public static void main(String[] args) def main(): function main()
System.out.println() print() console.log()
int int number
double float number
boolean bool boolean
char str string
String str string
true/false True/False true/false
null None null
void - undefined
import import import
子クラス名 extends 親クラス名 子クラス名(親クラス名) 子クラス名 extends 親クラス名
implements - -
try { } catch (Exception e) { } try: except Exception: try { } catch (e) { }
switch (x) { case 0: break; } if x == 0: switch (x) { case 0: break; }
for (int i = 0; i < 10; i++) { } for i in range(10): for (let i = 0; i < 10; i++) { }
while (true) { } while True: while (true) { }
do { } while (true); - do { } while (true);
break break break
continue continue continue
return return return
18
9
3

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
18
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?