0% found this document useful (0 votes)
13 views

Pythonwith Java

This document compares Python and Java. Python is dynamically typed, so variables do not need declaration and can hold objects of any type without casting. Python code is also more concise and uses indentation. In contrast, Java is statically typed, requiring declaration of variable names and types. Java code is more verbose and uses braces for structure.

Uploaded by

joey lang
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Pythonwith Java

This document compares Python and Java. Python is dynamically typed, so variables do not need declaration and can hold objects of any type without casting. Python code is also more concise and uses indentation. In contrast, Java is statically typed, requiring declaration of variable names and types. Java code is more verbose and uses braces for structure.

Uploaded by

joey lang
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Python vs JAVA

Dynamically Typed1.No need to declare anything. An assignment statement binds a name to an object, and the

object can be of any type.2.No type casting required when using container objects

Concise Express much in limited words

Compact

Uses Indentation for structuring code


Dynamically Typed1.No need to declare anything. An assignment statement binds a name to an object, and the object

can be of any type.2.No type casting required when using container objects

Concise Express much in limited words

Compact

Uses Indentation for structuring code


Java AND PYTHON

Statically Typed 1.All variable names (along with their types)

must be explicitly declared. Attempting to assign an object of

the wrong type to a variable name triggers a type

exception.2.Type casting is required when using container

objects.

Verbose Contains more words

Less Compact

Uses braces for structuring code

You might also like