Top Banner
Presentation On:- JAVA & C++ PUNJAB COLLEGE OF TECHNICAL EDUCATION PUNJAB COLLEGE OF TECHNICAL EDUCATION
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to java new

Presentation On:- JAVA & C++

PUNJAB COLLEGE OF TECHNICAL EDUCATIONPUNJAB COLLEGE OF TECHNICAL EDUCATION

Page 2: Introduction to java new

What is Java?

Java is a programming language.

The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities.

Java is a general-purpose, concurrent, class-based, object-oriented language.

Page 3: Introduction to java new

HISTORY

 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.

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

Sun Microsystems released the first public implementation as Java 1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA),

Page 4: Introduction to java new

In 19 Java 97, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the E.cma International to formalize.

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.

Continues………..

Page 5: Introduction to java new

Founder Of JAVA

James A. Gosling was born on May 19, 1955 near Calgary, Alberta, Canada.

He is a software developer.

He is best known as the father of the Java programming language.

Page 6: Introduction to java new

Principles of Java

There were five primary goals in the creation of the Java language:

It should be "simple, 1st grade level and familiar".It should be "robust and secure".It should be "architecture-neutral and portable".It should execute with "low performance".It should be "un interpreted, unthreaded, and dynamic".

 

Page 7: Introduction to java new

Java Virtual Machine

A Java Virtual Machine is a piece of software that is implemented on non-virtual hardware and on standard operating systems.

The use of the same bytecode for all JVMs on all platforms allows Java to be described as a "compile once, run anywhere”.

For example, Ada source code can be compiled to Java bytecode and executed on a JVM.

Page 8: Introduction to java new

Java Execution Environment

Java's execution environment is termed the Java Runtime Environment, or JRE.

Programs intended to run on a JVM must be compiled into a standardized portable binary format.

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.

Page 9: Introduction to java new

Cross Platform Compiler

A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run.

Cross compiler tools are used to generate executables for embedded system or multiple platforms.

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.

Page 10: Introduction to java new

What is c++ language?

C++ is a statically typed, free-form, multi-paradigm, compiled, general purpose programming language.

It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features

Page 11: Introduction to java new

History

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.

It was renamed C++ in 1983.

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.

Page 12: Introduction to java new

Founder Of C++

Bjarne Stroustrup was born on December 30, 1950 in Århus, Denmark.

He is a Danish computer scientist, most notable for the creation and the development of the widely used C++programming language.

He is currently Professor and holder of the College of Engineering Chair in Computer Science at Texas A&M University.

Page 13: Introduction to java new

Features of C++

C++ is the multi paradigm, compile, free form , general purpose, statistically typed programming language.

The main features of the C++ are:-

Classes

Inheritance

Data abstraction and encapsulation

Polymorphism

Dynamic Binding

Message Passing

Page 14: Introduction to java new

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.

Page 15: Introduction to java new

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.

Page 16: Introduction to java new

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

Page 17: Introduction to java new

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.

Page 18: Introduction to java new

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

Page 19: Introduction to java new

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.

Page 20: Introduction to java new

Thank You

Now The House Is

Open for Queries

Presented To:-

Mr. Rahul Dabral

FACULTY PCTE

Presented By:-Ankur BhallaSimranjeet SinghHarshdeep SinghHardyal Singh

BCA 3D