Header Ads Widget

What is Java


 Java is available free of charge and without exaggerating it is possible to use the most useful language programming at the top level.

The fact that we can also use this language in programming applications can be one of the most important reasons for its popularity, especially among Iranian programmers. We became acquainted with the history and grammar of this language.

Historical language Java

In the early 1990's, Mr. James Gosling and his colleagues felt dissatisfied with the complexity of the language ++ C, and for this reason they decided to invent the language, which in addition to the greater power of the language ++ C, enjoys more simplicity. The word "oak" was used in this language, the reason being that an oak tree in the adjoining chamber of Mr. Gosling was appointed, after the term managers of the company San Microsystems (Gasling & Co.) decided to name it appropriate. They choose the language.

For this purpose they went to a coffee shop and spent about half a day discussing this special issue and finally decided to use the abbreviations of their names, namely James Gosling and Arthur Van Hoff and also Andy Bechtolsheim and last name. Java is based on this language, although it is quoted as saying that Arthur and Andy, who were part of the starting team, have been separated from the company for some time, and James Gosling, along with two other employees of SanMicroSystems, Mike Sheridan and Patrick Naughton. Together with Mr. Gasling's development of the Java language under the name of the Green Project, he continued with the change of name to Java, but what is clear is that James Cassling has a vital map of Canada in this language.

Since the nomination ceremony was held in a coffee shop to indicate that the language used a "hot cup of coffee", although some say James Gosling is interested in the type of coffee that exists in the islands of Java (in Indonesia). The name Java is also derived from the same type of coffee, finally introduced in 1995 by Java through Sun Microsystems and later by Oakle.

The primary goals are Java

As we have said, James Gosling has expanded this language with the aim of replacing it with ++ C, with specific objectives also considered to be:

Being simple and popular

Ability to be powerful

Work and performance above and below

Ability to be transferable

Multiplication of satisfaction is higher and error is less

Oral Poetry with Treading

The motto was original Java

Java is a programming language that helps you build special software platforms for different platforms. If you intend to write programs with a "graphical user interface" (Graphical User Interface) or the term "GUI" for desktop, or you want a software-enabled server or a phone application for Android, Java language may be appropriate for you. To begin memorizing any language, one must first become familiar with the basic concepts. In this article, we will introduce you to 10 key concepts in Java language including the concept of class in Java programming.

For all kinds of applications, Java code texts in text files with "java." Write what they call "Java Source Files". The source files, using the Java compiler, will be compiled as "Class Files" in this language. Then, the class files, inside the archives of the "ZIP" side, are sometimes called "JAR Files". Later on, these jar files are assigned to the virtual Java machine and are executed using the subject "(" main ") in a specific class.

Variable

"Variable", one of the most basic concepts in any program is considered in every language. Variable, a place named in the memory program that can store values ??in itself. The following is a list of our most popular variables:


For every variable, there is a beginning and an end in the cycle of age.

The variable can be stored or retrieved from an external memory.

The amount of variable is variable.

Variables are used in calculations.

Suppose you want to calculate the area of ??a circle. To do this you need to store the radius of the circle in a variable (supposedly called radius) and then use it to cover the area (such as the code below).

Type

Each variable present in the Java program is a "Type". The types of variables can be divided into three groups, primitive, internal class and class defined by the user. As an example, the type of radius variable in the code above is double. In the following section, a brief description of the types of variables is observed:

Primary variables: «char» (for characters), «byte» (for a quantity 8-bit), «int» (for 32-bit valid numbers), «short» (for 16-bit valid numbers), «long (For correct 64-bit numbers), "float" (for decimal numbers to seven decimals) and "double" (for decimal decimals to fifteen decimals) are the primary variables of the examples.

Internal class: As an example, "String", an internal class is considered in Java to be used for storage and modification of threads.

Class defined by user: To show the more complex variables, the user can create their own classes (we will discuss this later in this section).

Object

"Object" is an example of a class. Define a class as a way to create something in a program while it is being implemented. In the following example, the syntax for creating a sample from the class defined above is given in a program and its extension:

In fact, the code written in the class section is defined as the design and concept of general calculation of area. In the above code, the term "circle" is used to calculate the total area. The same can be said of class communication.

Constructor

The "constructor" is a special class within a class that is constantly evolving. Extensive programming is carried out along with the input arguments while constructing the program. These arguments are then used to determine the initial quantity and the appropriate position for the object. For example, in the Circle class, the constructors for the discovery of radius have been created as an argument. The composer has a similar name to the class

Method

The "Object Method" is a special way of building a pace. The method used to perform calculations and refunds is considered to be an amount used in this case, which is defined as "return". In other cases, it may be just a matter of time before the situation changes. Accordingly, it would be defined as "void return". In addition, the method can also explore the arguments that are used in the calculations.

For example, the method "computeCircumference" is defined by the class Circle and for the calculation of the circumference of the circle. No argument is found in this method and when returned quantity is quantified, numeric double type is returned.

Pashto Tech

Post a Comment

0 Comments