Java Introduction

Java Introduction

Java is a programming language that revolutionized the open community. Java is a lot. In just three lines Java is a :

  • Programming language: Wiki says “Its a formal computer language designed to communicate instructions to a computer”
  • Computing platform: A platform where software applications can run
  • Technology: It is absolutely an application of scientific knowledge for practical purposes.

Who developed Java language?

Java was developed by Sun Microsystems. Sun Microsystems is now owned by Oracle Corporation. Therefore, Java’s official homepage is available at www.oracle.com/java[http://www.oracle.com/java]

Principles of Java language

Java programming language has been designed with the following five principles :

  1. Simple, Object-Oriented and Familiar
  2. Robust and Secure
  3. Architecture-Neutral and Portable
  4. High performance
  5. Interpreted, Threaded, and Dynamic

So, Java makes it a very easy choice for its adoption as a language of choice for most of the leading companies, hobbyists, and many more.

Usage of Java language

Java language is being used in

  • Your mobile phone
  • Web browser
  • Your Cable Setup box
  • Web applications
  • Server applications
  • Embedded applications
  • Big data technologies
  • And everywhere

As a result, the language has become highly popular among the developers and companies.

C++ vs Java vs C

 C++JavaC
 C++ is a general programming language created by Bjarne Stroustrup as an extension of c language     Java is class-based, object-based, and designed to have as few implementation dependencies as possible.  C is considered as all programming language father, and It is a general-purpose, procedural programming language supporting structured programming, lexical variable scope, and recursion.
DeveloperC++ programming language was invented by Bjarne Stroustrup in 1979Java language was invented by James Gosling in 1991C language was invented by Dennis Ritchie in 1972
Programming ParadigmIn C++ the programming paradigm follows the Object-Oriented programmingThe programming supports pure Object-Oriented ProgrammingC is entirely a procedural language.
OriginThe C++ programming language is based upon C language.Java is based on both C++ and the C language.C language is based on assembly level language.
TranslatorC++ follows compiler to translate the code into binary-level code.Java uses an interpreter to translate the code in binary codes.C also uses a compiler to translate the code into binary level code.
Platform dependencyC++ programming language is platform dependent.Java is platform-independent as the code written on one platform can run on any platform.C is also platform dependent.
Code ExecutionC++ supports direct code execution.Java follows JVM which Is Java Virtual Machine. Code will be sent to JVM for translation and code execution.C language follows direct code execution.
ApproachC++ supports the bottom-up approach.Java also supports bottom up approach.C language supports top down approach.
File generationIt generates a .exe file after compiling the program.It generates a .class file after compilation of a programIt also creates a .exe file.
Pre-processor directivesC++ follows #header and #define to include the pre-processor directives.Java uses the import option to import the packages it needs to compile the program it is runningC being the predecessor of CPP it also follows #header and #define to include
Key wordsC++ language has 63 defined keywords.Java language has 50 defined keywords.C language has the support for 52 keywords.
Data TypesData types like union and structure are supported in C++ programming.Structure and Union are not supported in Java.Data types like union and structure are supported in C language also.
In heritanceCpp and Java both support inheritanceBut Java does not support multiple inheritances. To support Java has to use a unique feature called interfaceDoes not support inheritance
OverloadingC++ support overloading through polymorphism.Operator overloading is not supported by Java.Overloading is not supported by C language.
PointersC++ supports pointers.Java does not support pointers.C supports pointers.
Memory AllocationCpp uses the new keyword to allocate memory to a program and to delete it uses “delete” keywordJava uses the new keyword to allocate memory and uses a unique feature called garbage collector to remove the unwanted memory space.When comes to C language we use calloc(), malloc() and realloc() function to allocate the memory to a particular program and we use the free() function if we wanted to delete or free the memory space from the individual application.
Exception HandlingC++ supports exception handling.Java also supports exception handling.C does not support exception handling.
TemplatesC++ supports templates.Java does not support templates.C does not support templates.
DestructorsSupported by C++Not endorsed by JavaC does not support the constructor nor destructors.
Multi-threading/ InterfacesMulti-threading is not supported by C++ programming language.Java supports multithreading to overcome the multiple inheritance problem.Being the predecessor of C++, it also does not support multi-threading.
Database connectivityC++ do not support DataBase connectivity.Java supports DataBase connectivity.C language does not support database connectivity.
Storage classesC++  supports the storage classJava does not supports storage classC supports storage class.
Follow Us On