What is the difference between Strongly typed and Weakly typed languages?


Ans:
In a statically typed language, you declare variables before you use them. In a dynamic one, you can use any variable at any time, as long as you initialize them before you use them. 

In a strongly typed language, variables have a type, and they will always be that type. You can not assign a value of one type, to a variable of another type. In a weakly typed language, variables don't have a type. You can assign anything to them. 

Java is a statically, strongly typed language. It is statically typed, because you always have to declare your variables before you use them. It is strongly typed, because a variable of type int will always hold int values. You can't assign booleans to them 

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More