The Wolfram Language is an elegant fusion of many programming paradigms—including the procedural, object-oriented and functional paradigms familiar to Java programmers—allowing you the flexibility to choose and combine strategies for different projects.
Python code contains a mixture of procedural, object-oriented and functional programming. The Wolfram Language also supports a wide variety of programming paradigms, while encouraging a more functional approach.
Java requires a semicolon to terminate statements. In the Wolfram Language, the semicolon is optional and has the added functionality of suppressing output display.
Semicolons ; can be used in Python to separate different operations on one line as well. In the Wolfram Language, they have the added benefit of suppressing unnecessary output from expressions.
Module introduces scoped variables similar to how methods in Java create locally scoped variables.
Module introduces scoped variables, similar to how functions and classes in Python create a separate scope from global variables.
Throw and Catch in the Wolfram Language generalize Java's try and catch constructs, enabling flexible flow control for a wide range of applications. For specifically handling errors, the Wolfram Language also includes the Check function.
Throw and Catch can be used like Python's Raise and Try/Except for exception handling.
The Wolfram Language has many procedural functions such as While, For, If and Switch that work similarly to the Java keywords of the same names, but they are typically unnecessary in Wolfram Language code.
The Wolfram Language has many of the procedural tools a Python programmer would expect: the While and If functions operate similar to the While and If constructs in Python. However, the For iterator is not the same as the For loop in Python, instead requiring an initializer, end-condition and increment statement. It can be simulated by using a Python For loop with a range() object.