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

Java & Python

Python and Java are programming languages that differ in how variables are typed and code is structured. Java uses static typing where variable types must be declared, while Python is dynamically typed so variables can be assigned objects of any type without declaration. Java code is more verbose and less compact than Python code, as it uses braces for structuring while Python relies on indentation.

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)
29 views

Java & Python

Python and Java are programming languages that differ in how variables are typed and code is structured. Java uses static typing where variable types must be declared, while Python is dynamically typed so variables can be assigned objects of any type without declaration. Java code is more verbose and less compact than Python code, as it uses braces for structuring while Python relies on indentation.

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/ 1

Python vs JAVA

Java AND PYTHON

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

must be explicitly declared. Attempting to assign an object of Dynamically Typed1.No need to declare anything. An

the wrong type to a variable name triggers a type assignment statement binds a name to an object, and the

exception.2.Type casting is required when using container object can be of any type.2.No type casting required

objects. when using container objects

Verbose Contains more words Concise Express much in limited words

Less Compact Compact

Uses braces for structuring code Uses Indentation for structuring code

You might also like