Presentation is loading. Please wait.

Presentation is loading. Please wait.

PROGRAMMING IN JAVA. INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented.

Similar presentations


Presentation on theme: "PROGRAMMING IN JAVA. INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented."— Presentation transcript:

1 PROGRAMMING IN JAVA

2 INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented.  Java was developed by James Gosling at Sun Microsystems. Goslings designed Java with a c / c++ style syntax that system and application programmers would find familiar.  The latest version of Java is Java 10

3 HISTORY OF JAVA  James Gosling, Mike Sheridan and Patrick Naughton initiated the Java language project in June 1991.Which is now has been acquired by Oracle Corporation.  The language was initially called Oak, Later the project went by the name Green and was finally renamed as Java from Java coffee.

4  Java was originally designed for developing the electronics things like VCR, television etc but it was too advanced for the digital cable television industry at that time.  Sun Microsystems released the first public implementation as Java1.0 in 1996. It promised “WRITE ONCE, RUN ANYWHERE”(WORA) providing no cost run time on popular platforms.

5 PRINCIPLES These are the primary goals in creation of Java language:-  “simple,object- oriented, and familiar”.  “robust and secure”.  “architecture – neutral and portable”.  “high performance”.  “interpreted, threated and dynamic”.

6 EDITIONS OF JAVA  Java card for smart cards.  Java platform, Micro edition (Java ME):- targeting environments with limited resources.  Java platform, Standard edition(Java SE):- targeting workstation environments.  Java platform Enterprise edition(Java EE):- targeting internet environments.

7 KEY FEATURES OF JAVA  Simple and Secure  Object- oriented  Platform independent and High performance  Robust and Portable  Dynamic and Interpreted  Architecture neutral  Multithread and Distributed

8 EVOLUTION OF JAVA FROM C++  In 1991, Sun Microsystems began to investigate how it might exploit the growing market of consumer electronics.  James Goslings was investigating the possibility of creating a hardware independent software platform for this above purpose  Initially, he used c++, but soon abandoned c++ and began the creation of a new language.

9  He decided that he wanted to base his language on the highly successful c++, but that he would incorporate only those features of c++ that were deemed worthwhile.  He eliminated some of the features from c++, they were:- Multiple Inheritance Automatic type conversion Pointers C++ memory management scheme.

10  Although the Oak technology was intriguing, the market was not quite ready for it.  With the advent of the web and emergence of browsers brought the Oak into existence and it was renamed as Java.  Sun created its browser, called Hot Java, using Java.

11  By 1995, Java ran on SPARC Solaris, Windows NT, Windows 95, and Linux.  By fall 1995, Java beta 1 was released and the Netscape navigator 2.0 browser incorporated Java.  Java 1.0 was officially released in jan 1996.

12 SECURE FEATURES OF JAVA COMPARED TO C++  Java does not supports pointers, structure, unions, templates, operator overloading etc. But c++ supports all.  The lack of pointers is to stop the Java programs from referencing memory locations illegally, and also enables garbage collection to be automatically carried out by JVM.  Pointers does not serve the purpose of being secure.  This makes it impossible to accidentally reference memory that belongs to other programs or the kernel.

13 1.COMPILE TIME CHECKING  It is more secure because of the ability of compile time checking. For an instance, if a method which is unauthorized and wanting to access a variable which is private, then the JVM catches the error during compile time. For avoiding system crash JVM catches more number of errors than c++.

14 2.ACCESS SPECIFIC KEYWORDS  It is another benefit for Java security and it is nothing but having an access specific keyword.  If access to a method is what programmer wants to give to other functions then public keyword must be used.  If the programmer wants to hide the information then private keyword must be used.  For avoiding data to be overridden the programs can use the final keyword.

15 3.OWN MEMORY MANAGEMENT  The memory management mechanism is unique and is owned by Java unlike C ++.  There is no need for manual intervention for garbage collection because everything is handled automatically. There is no need for a headache to free the memories.It drastically reduces the programmer overhead. Therefore the programmers hand must be free from memory management.  Relieving the memory in Java is the job of JVM.

16 ADVANTAGES OF JAVA OVER C++  Java supports Automatic Garbage Collection. It does not use/support destructors as c++ does.  It is platform independent because the codes in java are interpreted by Java virtual Machine on whichever platform it is being executed.

17 REAL TIME EXAMPLE OF JAVA  Most major companies use java in one way or the other. Many server-side applications are written in java to process tens of millions of request per day,high- frequency trading applications are also written in java.  It is used in Android apps, from scientific application to financial applications like electronic trading systems, from games like minecraft to desktop applications like Eclipse, Net beans etc. All are written in Java programming language, with Google’s Android API, which is similar to JDK.

18  By:-  Soumyashree.R.K(17BCAR3012)  Vini.S.P(17BCAR3013)  Goutham.S(17BCAR3015) Thank you


Download ppt "PROGRAMMING IN JAVA. INTRODUCTION TO JAVA  Java is a general purpose computer programming language that is concurrent, class-based, object- oriented."

Similar presentations


Ads by Google