Introduction
Java is a general purpose object oriented programming language. Sun Micro-systems java in the U.S. 1991 Was made in First java was named oak but later it was java by changing it. Java James Gosling had developed.
Primarily java was developed to create consumer electronics such as TV, VCR etc software.Java's most important and popular feature was that java platform was independent. Because java was not created for any particular hardware or operating system. Therefore, programs created in java can be executed on any system. This feature of Java makes java the most popular language today.
Features of Java:-
Java has many features. To become a good java programmer, you must know all these features. Let's try to find out some of the popular features of java.
Compiled and Interpreted
Most programming languages are either compiled or interpreted. But java combines these two approaches and creates a two stage system. First java generates byte code by compiling your program.
Byte code machine instructions are not. Therefore java interprets bytecode in second stage generates machine code, which can be executed directly.
Platform Independent
Java makes the bytecode platform independent. When you compile a java program, it gets converted into a byte code. These byte codes can not run on any machine or operating system. It just runs on JVM (Java Virtual Machine).
You have to install JVM on your operating system to run Java's program. There is a separate JVM for each operating system but the work does all the same. And that work is to convert the bytecode to the machine code for that operating system.
Object Oriented Principles of Java:
As I told you, java is an object oriented language. Java also follows all object oriented programming languages like object oriented principles. Let's try to know about these principles.
Encapsulation
Encapsulation is also called data hiding. In Encapsulation you declare private variables. And they access through public methods, your variables can access methods of your own class.
No other class can access your variables. In this way, you also hide data and also use it. Another means of encapsulation is to bind the data and code into one unit and to prevent access from the outside. Such your such variables and methods are binded in the same unit.
Java provides 3 levels of data hiding.
public - Your public class members can access other classes.
private - Your private class members can not access any other class.
protected - Only class to inherit your class can access your class members.
Inheritance
Through this principle you can access the variables of a class in second class. Doing so does not require you to write the same methods repeatedly. This keeps both the computer's memory and the programmer's time both up. Multiple inheritance is not allowed in Java. A class can inherit only one class. This reduces through java interfaces.
Polymorphism
Polymorphism means "one name and many things" Through polymorphism you can take one different action according to the situation from an interface. As is done in method overloading.
Abstraction
Abstraction is a very important concept of java. When you bike you do not know how the bike is working. You just run it. You do not know its internal work. The same concept of abstraction is also. You do not show your software's internal working user. Simply provide the interface to the user so that they will interact.
Java Development Tools:
In Java, software is created with the help of some built in development tools. Let's try to know about these development tools.
JDK (Java Development Kit):
JDK is an environment in which you can create any java program and execute it. Basically JDK has JRE which is responsible for the execution of any java program.
JRE (Java Runtime Environment):
JRE is responsible for the execution of java program. In Java, JRE is a group of classes and libraries that together create the program to execute the environment.
There are 2 jobs mainly JRE.
Finding the Main Method in the Program
Start the execution of the program.
JVM (Java Virtual Machine)
As you know, when you compile a java program, it is first converted into bytecode. After that it is converted to bytecode machine code. JVM is an environment or machine that converts bytecode to machine code. It works in conjunction with JRE.
-- Shweta adsule.
Java is a general purpose object oriented programming language. Sun Micro-systems java in the U.S. 1991 Was made in First java was named oak but later it was java by changing it. Java James Gosling had developed.Primarily java was developed to create consumer electronics such as TV, VCR etc software.Java's most important and popular feature was that java platform was independent. Because java was not created for any particular hardware or operating system. Therefore, programs created in java can be executed on any system. This feature of Java makes java the most popular language today.
Features of Java:-
Java has many features. To become a good java programmer, you must know all these features. Let's try to find out some of the popular features of java.
Compiled and Interpreted
Most programming languages are either compiled or interpreted. But java combines these two approaches and creates a two stage system. First java generates byte code by compiling your program.
Byte code machine instructions are not. Therefore java interprets bytecode in second stage generates machine code, which can be executed directly.
Platform Independent
Java makes the bytecode platform independent. When you compile a java program, it gets converted into a byte code. These byte codes can not run on any machine or operating system. It just runs on JVM (Java Virtual Machine).
You have to install JVM on your operating system to run Java's program. There is a separate JVM for each operating system but the work does all the same. And that work is to convert the bytecode to the machine code for that operating system.
Object Oriented Principles of Java:
As I told you, java is an object oriented language. Java also follows all object oriented programming languages like object oriented principles. Let's try to know about these principles.
Encapsulation
Encapsulation is also called data hiding. In Encapsulation you declare private variables. And they access through public methods, your variables can access methods of your own class.
No other class can access your variables. In this way, you also hide data and also use it. Another means of encapsulation is to bind the data and code into one unit and to prevent access from the outside. Such your such variables and methods are binded in the same unit.
Java provides 3 levels of data hiding.
public - Your public class members can access other classes.
private - Your private class members can not access any other class.
protected - Only class to inherit your class can access your class members.
Inheritance
Through this principle you can access the variables of a class in second class. Doing so does not require you to write the same methods repeatedly. This keeps both the computer's memory and the programmer's time both up. Multiple inheritance is not allowed in Java. A class can inherit only one class. This reduces through java interfaces.
Polymorphism
Polymorphism means "one name and many things" Through polymorphism you can take one different action according to the situation from an interface. As is done in method overloading.
Abstraction
Abstraction is a very important concept of java. When you bike you do not know how the bike is working. You just run it. You do not know its internal work. The same concept of abstraction is also. You do not show your software's internal working user. Simply provide the interface to the user so that they will interact.
Java Development Tools:
In Java, software is created with the help of some built in development tools. Let's try to know about these development tools.
JDK (Java Development Kit):
JDK is an environment in which you can create any java program and execute it. Basically JDK has JRE which is responsible for the execution of any java program.JRE (Java Runtime Environment):
JRE is responsible for the execution of java program. In Java, JRE is a group of classes and libraries that together create the program to execute the environment.
There are 2 jobs mainly JRE.
Finding the Main Method in the Program
Start the execution of the program.
JVM (Java Virtual Machine)
As you know, when you compile a java program, it is first converted into bytecode. After that it is converted to bytecode machine code. JVM is an environment or machine that converts bytecode to machine code. It works in conjunction with JRE.
-- Shweta adsule.
No comments:
Post a Comment