+ 1

Witch is better Python or Java?

They both seem very similar and they can do some of the same stuff. So....

8th May 2017, 10:44 PM
CodeDinosaur
CodeDinosaur - avatar
3 odpowiedzi
+ 15
Both Python and Java work well but in different ways. - Easier to learn: Python - Compiler: Java - Interpreter: Python (although there is PyPy) - Static: Java (variable type must be declared) - Dynamic: Python - Platform Compatibility: Java & Python - Industry community: Java is the leader - Database compatibility: Java & Python - Enterprise extensibility: Java - Verbose: Java (brackets/braces) - Concise: Python (identation/whitespace) - Compact: Python - Higher Job demand: Java - Android apps: Java - Programmer productivity: Python (3-5 times shorter than Java programs) - Speed (performance): Java - Faster prototyping: Python - Vast supply of open-source libraries: Java & Python - Multi-threading: Java Here's a code comparison of both languages in a slideshow: https://es.slideshare.net/mobile/dainawill/java-vs-python And also a funny comparison 😜: https://www.dropbox.com/s/fndnadic18b8pvv/javavspython.jpg?dl=1
9th May 2017, 1:29 AM
Pao
Pao - avatar
+ 6
@Jens90 wrote: << It really depends on your tasks >> It depends on tasks AND on targeted devices/os: on android, Java is widely better... On desktop os, it's almost a taste question about items listed in @Paola MB answer ^^ ( among wich is already specified that Java is better for android apps ;) )
9th May 2017, 6:26 AM
visph
visph - avatar
+ 4
It really depends on your task. For most cases nowadays Python might be better but there are a lot of cases you would use neither Python nor Java or Java. Or even both. Java has much better concurrency, is type-safe (in Python you can't easily restrict data types), inheritance with private or protected doesn't really work in Python, Java is faster and more. Nonetheless Python also has advantages. It is faster to develop in Python. Python is easier to learn. Java is compiled and Python interpreted. That really comes into account with larger applications. Script languages often have less built-in modularity.
8th May 2017, 10:51 PM
Jens90