java(it’s hot!!)
as you know in the market java is very popular.why java is hot now a days..??i’ll explain but before that will review the history of java so that we can understand the importance of this “hot cake”.
history of java:
java came in to picture in 1990s when c++ was very popular all over the world.the only disadvantage with c++ is c++ is platform dependent.so to solve this problem java came into picture.so what is platform independent and what is platform dependent.
platform dependent and platform independent??
during the execution of any program the “cpu” or “micro processor ” will expect that the language compilation and the election platform must be same.so these kind of programing language is called platform dependent language.
ex:
if program is written in windows platform that object file must be executed only in windows platform.ex:c,c++
so what is platform independence ..yeah exactly opposite to this.during the execution of the program microprocessor will check for compilation platform and execution platform.platform independent programming is such a language that can be edit in any platform and can execute in any platform.such a programing language is called platform independent language.ex:java
ex:
so can we achieve platform independency in java??
in java platform independency can be achieved by jvm(java virtual machine).when a java program is compiled, the java compiler would produce “byte code” as output.these byte codes such codes which are neither in hll nor in mll.they are in between both.hence they also called as “inter mediate level code”
these are secure and platform independent.hence bytecodes are the best suite codes to be transport over the internet.
jvm is a software which accepts byte code as an input and converts it into machine code.
why java is popular??
- java is the platform independent
- as per 2010 java was open source
- it can be freely downloadable
- easy coding
- occupy less memory
what are the disadvantages of java??
java is relative slow in execution when compared to c and c++.because a HL java program is not directly converted into MLL.because of this addition step involved in the conversion of HL java in to MLL java is reltively slow in execution.
so today we will see “what is object? and what i object orientation in java?so what is firstly orientation ?we can say that orientation is “the way how we see something”
for example a water can be viwed in many way by people.
this glass of water can be defined by chemist that half water and half gass..the optimist analys that as its a chance of 50%.there by the prespective.object orirntation is the prespective of looking at this world as a collection of object .
rules of object orientation:
1)the world is the collection of object.
2)no object is useless.every object is usefull
3)every object is in constant interation with every other object no object is in isolation
4)every object belongs to a type.though type dosnt exixts in reality,what exists in reality are its object.type is technically called as”class”.
5)every object has 2 part
1.has:it rffers to the properties of an object.in java it is handled using he concept called data type.
2.does:it reffers to the behavior of an object.it is handled using the concept called “method”
hope you like this content…
Comments
Post a Comment