Structure oriented language 'C' when implemented with new object oriented concepts, it becomes 'C++'.
These new language doesn't support/follow the concepts so C++ is also known as partial object oriented language. Both above languages are 16 bits (DOS-Base) application (Window based), implements all oops (object oriented programming) concept by removing the structural orientation from it. This new language is called 'OAK' It is Designed & Developed by the team whose leader is 'JAMES GOSLING' at 'SUN MicroSystems' USA in 1991.
Preliminary, this language is used for repairing & manufacturing of electronic equipment's like radio, transistor, press, etc... As this language follows better network, so the development team uses this application for chatting in Intranet process. This team creates a web browser for mailing of large data & named as 'Hot-JAVA'.
Later on, it comes into consideration, that this language is also applicable for academic purpose, So it again lunch at 1995 for the same purpose & Just renamed it as 'JAVA'. Java is famous for its slogan "Write Once, Run Anywhere."
There were five primary goals in the creation of the Java language:
- It must be "simple, object-oriented, and familiar".
- It must be "robust and secure".
- It must be "architecture-neutral and portable".
- It must execute with "high performance".
- It must be "interpreted, threaded, and dynamic".
Java Versions:
- JDK 1.0
- JDK 1.1
- J2SE 1.2
- J2SE 1.3
- J2SE 1.4
- J2SE 5.0
- Java SE 6
- Java SE 7
- Java SE 8
Features of JAVA
- Java is secured language.
- Java is complied and interpreted language.
- Java is platform independent language [It means we can compile sthe java application on one machine and run it on other machine with same or other platform (operating system). ]
- Java is famous for its slogan "WORA" means "Write Ones, Run Anywhere".
- Java is Simple, Robust & Dynamic language.
- Java is multi-threaded & distributed language.
- 'javac' command is used to invoke the .java file to it. compiler converts it into it's equivalent .class file (Byte code).
- 'Java' command is used to call the java interpreter (JVM-JAVA Virtual Machine), assign th .class file without extension to this command. It converts it into it's .exe file, print's the output & delete the .exe file from memory.
- Program should be save with the class name in which main() method is defined. Example: File Name: A.java
class A { public static void main(String args[]) { System.out.println("Hello"); System.out.println("How Are You ? "); System.out.println("Bye... "); } }
class B { int x=10; int y; void fun1() { System.out.println("Hello Fun1"); } public static void main(String args[]) { B b1=new B(); b1.fun1(); b1.fun1(); System.out.println(b1.x); System.out.println(b1.y); b1.y=50; System.out.println(b1.y); B b2=new B(); System.out.println(b2.x); System.out.println(b2.y); b2.fun1(); } }
Post A Comment: