Portability Each kind of computer has its unique instruction set. While some processors include the instructions for their predecessors, it’s generally true that a program that runs on one kind of computer won’t run on any other. Add in the services provided by the operating system, which each system describes in its own unique way, [...]
Archive for the ‘Java’ Category
[Java] Why bytecode not native code?
Posted in Java on November 18, 2011 | Leave a Comment »
Java as a platform
Posted in Java on November 18, 2011 | Leave a Comment »
A platform is the hardware or software environment in which a program runs. We’ve already mentioned some of the most popular platforms like Microsoft Windows, Linux, Solaris OS, and Mac OS. Most platforms can be described as a combination of the operating system and underlying hardware. The Java platform differs from most other platforms in [...]
Why Java?
Posted in Java on November 18, 2011 | Leave a Comment »
Get started quickly Although the Java programming language is a powerful object-oriented language, it’s easy to learn, especially for programmers already familiar with C or C++. Write less code Comparisons of program metrics (class counts, method counts, and so on) suggest that a program written in the Java programming language can be four times smaller [...]
The difference between “JDK”, JVM and “JRE”
Posted in Java on November 18, 2011 | Leave a Comment »
JVM: The use of the JVM is simple : – To change the byte code into the machine specific code. So the JVM converts the byte code(ie the code which we get when we compile the .java class) into the code that your machine/OS understands. JVM is machine specific. So JVM for windows will be [...]
Java Not Serializable Exception
Posted in Java, tagged bug fixes, Java on January 20, 2009 | Leave a Comment »
Solution: Implement the serializable interface for the class, whose objects you are going to write to a file (or) stream. (Ex:) importĀ java.io.Serializable; public class <className> implements Serializable
Why java is both interpreted and compiled language?
Posted in Java, tagged Java, lessons on January 17, 2009 | Leave a Comment »
Java is a compiled language because the source code is converted into byte code. This byte code is not a machine code. Java is an interpreted language because the byte code is interpreted by a virtual machine. The virtual machine allows the java code to be run on any platform. This route was chosen by [...]
Static and Dynamic Libraries
Posted in Java, tagged lessons, programming on January 17, 2009 | Leave a Comment »
Static Libraries Historically, libraries could only be static. A static library, also known as an archive, consists of a set of routines which are copied into a target application by the compiler, linker, or binder, producing object files and a stand-alone executable file. This process, and the stand-alone executable file, are known as a static [...]
Compiler and Interpreter
Posted in Java, tagged lessons, programming on January 17, 2009 | Leave a Comment »
Compiler A compiler is a computer program (or set of programs) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. [...]