Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 42 Online
OpenStudy (anonymous):

general question: what is the difference between java and python?

OpenStudy (anonymous):

i don't knew

OpenStudy (anonymous):

Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Python programs are typically 3-5 times shorter than equivalent Java programs. This difference can be attributed to Python's built-in high-level data types and its dynamic typing. For example, a Python programmer wastes no time declaring the types of arguments or variables, and Python's powerful polymorphic list and dictionary types, for which rich syntactic support is built straight into the language, find a use in almost every Python program. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time. It then invokes the appropriate addition operation, which may be an overloaded user-defined method. Java, on the other hand, can perform an efficient integer or floating point addition, but requires variable declarations for a and b, and does not allow overloading of the + operator for instances of user-defined classes. For these reasons, Python is much better suited as a "glue" language, while Java is better characterized as a low-level implementation language. In fact, the two together make an excellent combination. Components can be developed in Java and combined to form applications in Python; Python can also be used to prototype components until their design can be "hardened" in a Java implementation. To support this type of development, a Python implementation written in Java is under development, which allows calling Python code from Java and vice versa. In this implementation, Python source code is translated to Java bytecode (with help from a run-time library to support Python's dynamic semantics).

OpenStudy (anonymous):

thanx Mephisto

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
whiteybulger: Should I drop this song i made last night in the studio
15 hours ago 50 Replies 0 Medals
Stewart: How do you know which tribe belongs to which reservation?
19 hours ago 2 Replies 0 Medals
randogirl123: me as hello kitty!! Still needs improvements, let me know what you thinkk
17 hours ago 32 Replies 2 Medals
Breathless: What is vaka blast made out of?
1 day ago 3 Replies 0 Medals
EdwinJsHispanic: another singing vid but for the people who knows spanish
1 day ago 16 Replies 1 Medal
EdwinJsHispanic: another singing vid, please give me your thoughts on it
1 day ago 20 Replies 2 Medals
SwaggyMark: Need help on process of annuity problem
2 days ago 3 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!