Henry Wong wrote:
karthikeya kumar wrote:In C language char has range from -127 to 128 but in Java char range is from 0 to 65535.Can I know why dont we have negative value range for char data type in Java
I would reverse the question. ASCII, extended ASCII, Unicode, etc. are all using non-negative values. So, what would the purpose of having negative values?
Henry
Bear Bibeault wrote:
karthikeya kumar wrote:I was explained by my sir that every o.s will have by default Java installed in that machine.
This. Is. Not. True.
Clear now?
Tim Holloway wrote:Welcome to the JavaRanch, Karthikeya!
Java is a rather large software system and unlike COBOL and Fortran, it was developed as the property of a single corporation (Sun Microsystems). Sun was open to third-party implementations, so other vendors such as IBM produced their own products, such as J9.
However, the original Java implementation required some proprietary code, so the open-source OS's (such as Linux) couldn't include it and Microsoft got slapped for attempting to hijack Java into a proprietary system of their own, so Microsoft refused to bundle Java with Windows.
Sun worked on the proprietary issues as did a number of independent developers and the result was a series of JVMs ending up with the IcedTea JVM, which is a virtually complete implementation of the Java spec. This JVM is now routinely pre-installed as part of more popular Linux distros. Microsoft, however, still doesn't include Java with Windows.
One thing to note about the IcedTea JVM is that for a long time, it lacked certain features of the "official" JVMs, so it wasn't useful when you needed advanced JVM services, such as J2EE servers require. All of this is supposed to be fixed now, but most of us still prefer to use the Sun/Oracle JVM when doing industrial-grade Java work.
Henry Wong wrote:
karthikeya kumar wrote:
If O.S does not have Java installed or not then how come the byte code or the individual code gets executed.
If Java is not installed on the system, then the system can't run Java programs.
Henry