You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The comparison operator for numbers are the same as in Python. For built-in types, instead of == in Python, Java uses equals method. 

 

Strings in Java
 
Strings in Python
 

 

Python's Boolean operators: and, or, and not are replaced by: &&, || and ! in Java.


Strings in Java
 
Strings in Python
 


Negation is also formed differently between those two programming languages

 

Negation in Java
 
Negation in Python
x is not y

 



  • No labels