Java History:
-Major features were derived from C (its syntax)and C++(its OOP principles).-In C++, the object model implementation is not effective and it is very difficult to achieve platform-independence.
JAVA:
So, They thought that we need a language which gives better implementation to OOP principles(to manage the complexity of project) and as well need a language which can be used to write software applications for electronic devices like Micro oven ,Remote controls,Washing machines..etc.,
- For that reasons, James Gosling along with his teammates(Green Team,in SunMicroSystems) started a project,called Green project in 1991 to develop a language which satisfies the platform-independence and gives the better refinement for OOP principles.
- So, that Green project outcome was the language "Oak" in 1992.
- Later on in 1995 they renamed Oak to JAVA(its an Island name).
Q) What do you mean by the platform-independence?
Ans: Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute that ".class" in any other supported platform eg (Linux,Solaris,etc).
How java changed internet?
-Generally, by using java we can write 2 kinds of programs:
1.Applications(which can be executed by your OS)
2.Applets(which are designed to be transmitted over internet and executed by the java compatible web browsers)
-Applets changed the entire web programming.
-Applets are self executable programs(active agents).
Issues:
- Security(While you are downloading a content from internet,there may be a chance to attack viruses.But if that application was developed in java,no virus attacks are allowed into your system.)[JVM will take care about those kind of attacks].
- Portability(The systems with different OSs,different CPUs,different internal resources can access and run an application(developed in java) through internet).
Q) What is JVM?
Ans: It is JAVA VIRTUAL MACHINE, which provides the runtime environment to our java applications.
Q) What was the first web browser developed in java?
Ans: WebRunner(Hot Java) by SunMicroSystems only.
Q) Which company developed Java?
Ans: SunMicroSystems (recently acquired by Oracle)
Java Buzzwords:
- Simple
- OOP
- Secure
- Portable
- Robust
- Multithreaded
- Architecture-neutral
- High performance and Interpreted
- Distributed
- Dynamic
Simple: Easy to learn to C/C++ programmers(as well for novice users too).
OOP: Java is pure OOP language.[Even though it is having primitive types we can represent them as objects through Wrapper classes]
Secure and portable [Discussed above]
Robust:
No of concepts available in java which makes java as a robust language.Apart from them 2 main concepts are:
a)Memory management:(the unused objects will be automatically deallocated by Garbage Collector,where as in C/C++ manually you have to deallocate)
b)Exception handling:(Runtime errors can easily handle with java.Ex: Divided by zero error)
Multithreaded:(We can write a program that can do more than one task simultaneously)
Architecture-neutral:(Java applications goal was WORA[Write once,run any where,any time,forever] means that irrespective of CPU architecture we can run a compiled java code on any system)
High performance and Interpreted:
To execute java applications we use interpreter(JVM).Generally interpreters slowly translates the code when compare with compilers, But in our JVM internally we have a compiler, called JIT(Just-In-Time) to boost the performance.So, we can say that JVM executes the code little bit faster than other languages interpreters.
Note: The code that is assigned to JIT is called as a "hot spot".
Distributed:
We can write applications which can be at different locations that they can communicate with each other to accomplish a common goal.
Dynamic:
We can embed some extra code with the bytecode dynamically without having any security issues during execution.
Next topic
Data types(will be updated soon)
We can embed some extra code with the bytecode dynamically without having any security issues during execution.
Next topic
Data types(will be updated soon)
Comments
Post a Comment