JAVA
PROGRAMMING
Differences between C, C++ and Java
Metrics C C++ Java
Programming
Paradigm
Procedural
language
Object-Oriented
Programming
(OOP)
Pure Object
Oriented Oriented
Origin
Based on
assembly language
Based on C
language
Based on C and
C++
Developer
Dennis Ritchie in
1972
Bjarne Stroustrup
in 1979
James Gosling in
1991
Translator Compiler only Compiler only
Interpreted
language
(Compiler +
interpreter)
Platform
Dependency
Platform
Dependent
Platform
Dependent
Platform
Independent
Code
execution
Direct Direct
Executed by
JVM (Java
Virtual
Machine)
Approach
Top-down
approach
Bottom-up
approach
Bottom-up
approach
File generation .exe files .exe files .class files
Pre-processor
directives
Support header
files (#include,
#define)
Supported
(#header,
#define)
Use Packages
(import)
keywords
Support 32
keywords
Supports 63
keywords
50 defined
keywords
Datatypes (union,
structure)
Supported Supported Not supported
Inheritance No inheritance Supported
Supported except
Multiple inheritance
Overloading No overloading
Support Function
overloading
(Polymorphism)
Operator overloading is
not supported
Pointers Supported Supported Not supported
Allocation Use malloc, calloc Use new, delete Garbage collector
Exception Handling Not supported Supported Supported
Templates Not supported Supported Not supported
Destructors
No constructor
neither destructor
Supported Not supported
Multithreading/
Interfaces
Not supported Not supported Supported
Database
connectivity
Not supported Not supported Supported
Storage Classes
Supported ( auto,
extern )
Supported ( auto,
extern )
Not supported
JAVAAND INTERNET
Java is strongly associated with the Internet.
 Internet users can use Java to create applet programs and run them locally using a
"Java-enabled browser" such as HotJava.
 They can also use a Java-enabled browser to download an applet located on a
computer anywhere in the Internet and run it on any local computer.
 Java applets have made the Internet a true extension of the storage system of the
local computer.
 Internet users can also setup their websites containing java applets that could be
used by other remote users of Internet.
This feature made Java most popular programming language for Internet.
JAVAAND WORLD WIDE WEB
 World Wide Web (WWW) is an open-ended information retrieval system
designed to be used in the Internet's distributed environment.
This system contains Web pages that provide both information and controls.
Web system is open-ended and we can navigate to a new document in any
direction.
 This is made possible with the help of a language called Hypertext Markup
Language (HTML).
 Web pages contain HTML tags that enable us to find, retrieve, manipulate
and display documents worldwide.
Java was meant to be used in distributed environments such as
Internet.
The Web and Java share the same philosophy, Java could be easily
incorporated into the Web system.
 Before Java, the World Wide Web was limited to the display of still
images and texts.
However, the incorporation of Java into Web pages has made it
capable of supporting animation, graphics, games, and a wide range of
special effects.
WEB BROWSERS
The internet is a vast sea of information represented in many formats and stored
on many computers.
 A browser is a software application used to locate, retrieve and display content on
the World Wide Web, including Web pages, images, video and other files.
A client/server model, the browser is the client run on a computer that contacts the
Web server and requests information.
 The Web server sends the information back to the Web browser which displays
the results.
The browser application retrieves or fetches code, usually written in HTML
(HyperText Markup Language) and/or another language, from a web server,
interprets this code, and renders (displays) it as a Web page to view. on the
computer or another Internet-enabled device that supports a browser.
Basic of java
Basic of java
Basic of java
Basic of java
Basic of java
Basic of java

Basic of java

  • 1.
  • 2.
    Differences between C,C++ and Java Metrics C C++ Java Programming Paradigm Procedural language Object-Oriented Programming (OOP) Pure Object Oriented Oriented Origin Based on assembly language Based on C language Based on C and C++ Developer Dennis Ritchie in 1972 Bjarne Stroustrup in 1979 James Gosling in 1991 Translator Compiler only Compiler only Interpreted language (Compiler + interpreter)
  • 3.
    Platform Dependency Platform Dependent Platform Dependent Platform Independent Code execution Direct Direct Executed by JVM(Java Virtual Machine) Approach Top-down approach Bottom-up approach Bottom-up approach File generation .exe files .exe files .class files Pre-processor directives Support header files (#include, #define) Supported (#header, #define) Use Packages (import) keywords Support 32 keywords Supports 63 keywords 50 defined keywords
  • 4.
    Datatypes (union, structure) Supported SupportedNot supported Inheritance No inheritance Supported Supported except Multiple inheritance Overloading No overloading Support Function overloading (Polymorphism) Operator overloading is not supported Pointers Supported Supported Not supported Allocation Use malloc, calloc Use new, delete Garbage collector Exception Handling Not supported Supported Supported Templates Not supported Supported Not supported
  • 5.
    Destructors No constructor neither destructor SupportedNot supported Multithreading/ Interfaces Not supported Not supported Supported Database connectivity Not supported Not supported Supported Storage Classes Supported ( auto, extern ) Supported ( auto, extern ) Not supported
  • 6.
    JAVAAND INTERNET Java isstrongly associated with the Internet.  Internet users can use Java to create applet programs and run them locally using a "Java-enabled browser" such as HotJava.  They can also use a Java-enabled browser to download an applet located on a computer anywhere in the Internet and run it on any local computer.  Java applets have made the Internet a true extension of the storage system of the local computer.  Internet users can also setup their websites containing java applets that could be used by other remote users of Internet. This feature made Java most popular programming language for Internet.
  • 7.
    JAVAAND WORLD WIDEWEB  World Wide Web (WWW) is an open-ended information retrieval system designed to be used in the Internet's distributed environment. This system contains Web pages that provide both information and controls. Web system is open-ended and we can navigate to a new document in any direction.  This is made possible with the help of a language called Hypertext Markup Language (HTML).  Web pages contain HTML tags that enable us to find, retrieve, manipulate and display documents worldwide.
  • 8.
    Java was meantto be used in distributed environments such as Internet. The Web and Java share the same philosophy, Java could be easily incorporated into the Web system.  Before Java, the World Wide Web was limited to the display of still images and texts. However, the incorporation of Java into Web pages has made it capable of supporting animation, graphics, games, and a wide range of special effects.
  • 10.
    WEB BROWSERS The internetis a vast sea of information represented in many formats and stored on many computers.  A browser is a software application used to locate, retrieve and display content on the World Wide Web, including Web pages, images, video and other files. A client/server model, the browser is the client run on a computer that contacts the Web server and requests information.  The Web server sends the information back to the Web browser which displays the results. The browser application retrieves or fetches code, usually written in HTML (HyperText Markup Language) and/or another language, from a web server, interprets this code, and renders (displays) it as a Web page to view. on the computer or another Internet-enabled device that supports a browser.