Syntax Comparison
From mi-linux
Jump to navigationJump to searchBasics
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Multi-line comment | /* comment */ |
/* comment */ |
/* comment */ |
Doesn't have multi-line comments. |
Selection
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Iteration
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Compound types (arrays, lists, etc)
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Input / output
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Exception handling
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Dealing with types
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Classes, objects, methods, etc
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |