In: Computer Science
1.Java
Java is an object Oriented Programming (OOP) language.
It incorporates almost every OOP features. Object creation through
object template
i.e. class, data abstraction and encapsulation, data and code
sharing through inheritance.
Overloading concept through polymorphism, and data/process hiding
etc. are some basic OOP features in Java
Java has a concept called Java Virtual Machine (JVM).
This JVM specifies wonderfully detailed with a dummy CPU and dummy
instruction set that looks like standard assembly code.
The Java compiler transforms the source programs into the
instructions of JVM. The compiled Java code in known as byte code
instruction.
Java interpreter is there which is specific to each environment
(processor and OS) and converts the byte code instructions into the
native processor instructions before executing it.
This converts a program source into an object code is compile half
way and interpret half way
2.Ruby:
It is a general purpose and object oriented programming language
invented in 1993 by Yukihiro Matz Matsumoto.
It is one of the fastest growing programming languages among many
object oriented programming lanhuages.
Ruby is very easy to use and you can create an app with in 10
minutes.
Groupon, Airbnb and Pxlr all are coded in Ruby.
Ruby operates as a dynamic, object orientated, because it reads
like English.
It makes the code easy to read.
It’s needed to maintain code databases for many high end
websites.
Ruby MRI is the most commonly used Ruby interpreter.
Compiler:
Compiler is a translator that reads the entire program and converts
it to source code for successful execution. The compiler also give
us the errors and warning if any before the program execution. The
source code acts as an input to the compiler and the object code is
the output of the compiler.
But the process of compilation takes some time as we need to correct all the errors it gives before program execution. It can also link intermediate classes and subroutines to the source program and act as a linker. Most of the high level languages such as C, C++, JAVA, etc. uses compiler.
Interpreter:
Interpreter is also a translator and converts the source code into
object code but in a different way than the compiler. The
interpreters reads the source code line by line and executes the
program directly. The object code is also created line by line.
The interpreters are fast as compared to compilers as they don’t go for error checking at a whole and the error is checked at the run-time. Very high level languages such as C#, F#, etc are interpreter oriented.