Breaking

Saturday, February 16, 2019

What is Java

What is Java

Java may be a widespread programing language, created in 1995.It is in hand by Oracle, and over three billion devices run Java.It is used for:Mobile applications (especially Android apps)Desktop applicationsWeb applicationsWeb servers and application serversGamesDatabase connectionAnd much, much more!
What is Java
learnwitharyan

JAVA

Java may be a high-level programing language originally developed by Sun Microsystem and discharged in 1995.Java may be an all-purpose programming language that's coinciding, Class-based, Object destined and specifically designed to possess as few implementation dependence as doable.Java runs on a range of platforms, such as Windows, Mac OS and the various version of UNIX.Java application is typically compiled to bytecode that can run an any JAVA VIRTUAL MACHINE(JVM) regardless of computer architecture.Java is Object-oriented programming language.

Why Use Java?

Java works on totally different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)It is one in every of the foremost widespread programing language within the worldIt is straightforward to be told and straightforward to useIt is open-source and freeIt is secure, fast and powerfulIt has large community support (tens of countless developers)

Features of JAVA:

➤SIMPLE

➤PLATFORM INDEPENDENT

➤SECURED

➤ARCHITECTURE

➤EXCEPTION HANDLING

➤MULTI-THREADED

➤ROBUST

 

➤SIMPLE According to SUN MICROSYSTEM: JAVA language is simple because Syntax is based on C++(so easier for programmers to learn it after C++. 

➤PLATFORM INDEPENDENT: A Platform is the hardware or software environment in which a program runs.

 There are two types of Platform- 

(1)Software-based
 (2)Hardware-based

 NOTE: Java provides software-based Platform Java code can be run on multiple platforms e.g; Windows, Linux, Mac/OS, etc. JAVA code is compiled by the Compiler and converted into bytecode. This bytecode is a platform independent code because it can be run on multiple platforms i.e; Write once and run anywhere(WORA).

 SECURED: JAVA IS SECURED BECAUSE of →

No explicit pointer. →
Java program run inside virtual machine sandbox. →Classloader, Bytecode verifier, and security manager this security are provided by Java language. 

ARCHITECTURE NEUTRAL:

 ⇶There are no implementation dependent features. 

 ⇶The size of primitive types is Fixed.
 ⇶In C Programming int Data types occupy 2 bytes of memory for 32-bit architecture.
 ⇶And 4 bytes of memory for 64-bit architecture.
 ⇶In Java, it occupies 4 bytes of memory for both 32 and 64-bit architecture. 


EXCEPTION HANDLING:
 The exception handling in Java is one of the power mechanism to handle the run-time errors so that the normal flow of the application can be maintained. 

MULTI-THREADED:
 A thread is like a separate program execute concurrently. We can write Java programs that deal with, many tasks at once by defining multiple threads. It doesn't occupy memory for each thread. It shares a common memory area. Threads are important for multi-media, Web applications, etc. 

ROBUST:
 Robust simply means strong.Java uses strong memory management. These are lack of pointers that avoids security problems. There is automatics garbage collection in JAVA. There are exception handling and type checking mechanism in Java. All these points make JAVA ROBUST. FEATURES OF OOPS: OBJECT CLASS INHERITANCE POLYMORPHISM ABSTRACTION ENCAPSULATION OBJECT: A self-contained entity that consists of both data and procedures to manipulate the data. An object is a physical entity of a class with all the properties of class an object is used to features of the class. CLASS: A class may have crores of an object but they are never seen because the object has its own properties,i.e, the physical properties. FOR EXAMPLES: Ram is a student of medicine and Shyam is a student of engineering. Both are a student but Physically they are different.

 ENCAPSULATION:

 The hiding of data for security especially the encapsulation restrict the accessibility of DATA. The three keywords public, Protected and Private. It is used in encapsulation. The class data member a public member does not have an identical restriction. The protected data are more restricted than the PUBLIC. The PRIVATE data are completely restricted to the class.

 POLYMORPHISM: THE ONE THING HAVE MULTIPLE FORMS IS KNOWS AS POLYMORPHISM.


 POLY+MORPHISM 


⇩ ⇩ MANY FORMS IN JAVA WE CAN IMPLEMENT OF POLYMORPHISM WITH USING⇾ METHOD OVERLOADING CONSTRUCTOR OVERLOADING METHOD OVERRIDING INHERITANCE: Derivation of property from one class to another class. It is always be performed in class. INHERITANCE BASICALLY TWO CATEGORIES:- SINGLE INHERITANCE MULTIPLE INHERITANCE IN JAVA, multiple inheritances is not present only, one inheritance present.i.e, single inheritance. DATA ABSTRACTION: It is a process by performed in which class hides its data number and abstract, the properties in the forms of class. 


EX:- 
What is Java
learnwitharyan

CLASS A
 CLASS B
 CLASS C
 { { { int x; int x; float f; } } }
 A FIRST SIMPLE JAVA PROGRAM- CLASS FIRST { PUBLIC STATIC VOID MAIN(STRING ARG[]) 
{ SYSTEM.OUT.println(''THIS IS MY FIRST JAVA PROGRAMME''); } }
.

1 comment: