AllExperts > Experts 
Search      

Java

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Java Answers
Question Library

Ask a question about Java
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Neal Ziring
Expertise
Almost anything about the core Java platform, with an emphasis on networking. Not familiar with JDBC or the new Java graphics APIs. [Sun Certified Java Programmer, JDK 1.1]

Experience
Certified Java Programmer for JDK 1.1 and 2.0.
 
   

You are here:  Experts > Computing/Technology > Focus on Java > Java > Java strongly typed ??!!

Topic: Java



Expert: Neal Ziring
Date: 7/18/2008
Subject: Java strongly typed ??!!

Question
hello Neal,

I'm just wonderin what does it mean that "Java is strongly typed".. I tried lookin it up but I'm still confused why some languages are considred strong or weak.. because of  conversions across all types of variables or what exactly ??

I wish you can provide me with some detailed but simple explaination or some example..

Thank you.

Answer
Munther,

The description "strongly typed" is very difficult to pin down.
Even computer science professors can have trouble with it.  It
isn't a clear-cut issue.

There are a number of factors that make a language strongly
types.  If it has some or all of those, then we may say the language
is strongly typed, otherwise we say it is weakly typed.  Some of
those factors are:

1. Variables and other objects in the language must be declared
  with a type.  (Ex. Java v. Javascript).

2. Assignment of a value of one type to a variable of a conflicting
  type causes an error to be raised (Ex. Java v. C)

3. During execution, every data value is explicitly or implicitly
  qualified with its type, and decisions can be made about
  types [i.e., introspection]

4. The language provides few or no means for bypassing the type
  system (Ex. Java v. C)

5. Runtime-behavior or semantics of the language are explicitly
  defined based on types (Ex. Pascal v. assembly)

By these criteria, Java and Ada are strongly typed, while C is
weakly typed.  Javascript falls somewhere in the middle.

You can get some more information here:
http://en.wikipedia.org/wiki/Strongly-typed_programming_language


Hope this helps...

...nz


Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.