Presentation On:- JAVA & C++ PUNJAB COLLEGE OF TECHNICAL EDUCATION
What is Java? <ul><li>Java is a programming language. </li></ul><ul><li>The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. </li></ul><ul><li>Java is a general-purpose, concurrent, class-based, object-oriented language. </li></ul>
HISTORY <ul><li> </li></ul><ul><li>Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. </li></ul><ul><li>The language was initially called Oak after an oak tree that stood outside Gosling's office; it went by the name Green later, and was later renamed as java </li></ul><ul><li>Sun Microsystems released the first public implementation as Java 1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA), </li></ul>
<ul><li>In 19 Java 97, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the E.cma International to formalize. </li></ul><ul><li>On November 13, 2006, Sun released much of Java as open source software under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Java's core code available under free software/open-source distribution terms. </li></ul>Continues………..
Founder Of JAVA <ul><li>James A. Gosling was born on May 19, 1955 near Calgary, Alberta, Canada. </li></ul><ul><li>He is a software developer. </li></ul><ul><li>He is best known as the father of the Java programming language. </li></ul>
Principles of Java <ul><li>There were five primary goals in the creation of the Java language: </li></ul><ul><li>It should be "simple, 1st grade level and familiar". </li></ul><ul><li>It should be "robust and secure". </li></ul><ul><li>It should be "architecture-neutral and portable". </li></ul><ul><li>It should execute with "low performance". </li></ul><ul><li>It should be "un interpreted, unthreaded, and dynamic". </li></ul><ul><li> </li></ul>
Java Virtual Machine <ul><li>A Java Virtual Machine is a piece of software that is implemented on non-virtual hardware and on standard operating systems. </li></ul><ul><li>The use of the same bytecode for all JVMs on all platforms allows Java to be described as a "compile once, run anywhere”. </li></ul><ul><li>For example, Ada source code can be compiled to Java bytecode and executed on a JVM. </li></ul>
Java Execution Environment <ul><li>Java's execution environment is termed the Java Runtime Environment, or JRE. </li></ul><ul><li>Programs intended to run on a JVM must be compiled into a standardized portable binary format. </li></ul><ul><li>A program may consist of many classes in different files. For easier distribution of large programs, multiple class files may be packaged together in a .jar file. </li></ul>
Cross Platform Compiler <ul><li>A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. </li></ul><ul><li>Cross compiler tools are used to generate executables for embedded system or multiple platforms. </li></ul><ul><li>It is used to compile for a platform upon which it is not feasible to do the compiling, like microcontrollers that don't support an operating system. </li></ul>
What is c++ language? <ul><li>C++ is a statically typed, free-form, multi-paradigm, compiled, general purpose programming language. </li></ul><ul><li>It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features </li></ul>
History <ul><li>It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C language and originally named C with CLASSES. </li></ul><ul><li>It was renamed C++ in 1983. </li></ul><ul><li>C++ is one of the most popular programming languages and its application domains include systems software (such as Microsoft Windows, application software, device drivers, embedded software etc. </li></ul>
Founder Of C++ <ul><li>Bjarne Stroustrup was born on December 30, 1950 in Århus, Denmark. </li></ul><ul><li>He is a Danish computer scientist, most notable for the creation and the development of the widely used C++programming language. </li></ul><ul><li>He is currently Professor and holder of the College of Engineering Chair in Computer Science at Texas A&M University. </li></ul>
Features of C++ <ul><li>C++ is the multi paradigm, compile, free form , general purpose, statistically typed programming language. </li></ul><ul><li>The main features of the C++ are:- </li></ul><ul><li>Classes </li></ul><ul><li>Inheritance </li></ul><ul><li>Data abstraction and encapsulation </li></ul><ul><li>Polymorphism </li></ul><ul><li>Dynamic Binding </li></ul><ul><li>Message Passing </li></ul>
Difference Between C++ & Java C++ JAVA Compatible with C source code, except for a few corner cases. No backward compatibility with any previous language. The syntax is however strongly influenced by C/C++. Write once compile anywhere (WOCA) Write once run anywhere / everywhere (WORA / WORE) Allows procedural programming, object-oriented programming, and generic programming. Strongly encourages an object oriented programming paradigm.
C++ JAVA Allows direct calls to native system libraries. Call through the Java Native Interface and recently Java Native Access. Exposes low-level system facilities. Runs in a protected virtual machine Only provides object types and type names. Is reflective, allowing metaprogramming and dynamic code generation at runtime. Has multiple binary compatibility standards (commonly Microsoft and Itanium/GNU) Has a binary compatibility standard, allowing runtime check of correctness of libraries.
C++ JAVA Optional automated bounds checking. (e.g. the at() method invector and string containers) Normally performs bounds checking. HotSpotcan remove bounds checking. Standardized minimum limits for all numerical types, but the actual sizes are implementation-defined. Standardized limits and sizes of all primitive types on all platforms Pointers, References, and pass by value are supported Primitive and reference data types always passed by value
C++ JAVA Supports class, struck, and union and can allocate them on heap or stack Supports only class and allocates them on the heap. Allows explicitly ove rriding types. Rigid type safety except for widening conversions. Autoboxing/Unboxing added in Java. Operator overloading for most operators The meaning of operators is generally immutable, however the + and += operators have been overloaded for Strings.
C++ JAVA Full multiple inheritance, including virtual inheritance. Single inheritance only from classes, multiple from interfaces Compile time Templates Generics are used to achieve an analogous effect to C++ templates, however they do not translate from source code to byte code due to the use of Type Erasure by the compiler. Function pointers, function objects, lambdas (in C++0x) and interfaces No function pointer mechanism. Instead idioms such as Interfaces, Adapters and Listeners are extensively used. No standard inline documentation mechanism. 3rd party software (e.g. Doxygen) exists. Javadoc standard documentation
C++ JAVA const keyword for defining immutable variables and member functions that do not change the object. final provides a limited version of const, equivalent to type*const pointers for objects and plain const of primitive types only. No const member functions, nor any equivalent to const type* pointers. Supports the goto statement. Supports labels with loops and statement blocks.
<ul><li>Thank You </li></ul><ul><li>Now The House Is </li></ul><ul><li>Open for Queries </li></ul>Presented To:- Mr. Rahul Dabral FACULTY PCTE Presented By:- Ankur Bhalla Simranjeet Singh Harshdeep Singh Hardyal Singh BCA 3D
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.