Monday, June 3, 2019

The History Of Java Philosophy Essay

The History Of java Philosophy Essay chocolate is an object-oriented programming talking to developed by Sun Microsystems in 1991 and first released in 1995. Its development was led by the Green police squad, managed by the flagship programmer James Gosling. In the outset was to be called Oak, and there are many theories of why this name, being the most accepted the fact that there was an oak tree (Oak in English) against the Green Team office. That name turned out to be little commercial locations, apart from already having been registered. Finally, at the offices of Sun, it was decided to call it deep brown.In the beginning was c formerlyived as a programming dustup oriented to system fixed and domestic appliances. This did not nonplus the awaited success and under the expectations. The Web was the lever that drives this language with a technology called applets that were desktop applications that could develop into a web environment, through a plugin in any browser. This cr eated a business strategy between Sun Microsystems and Netscape, creators of coffee beanScript. chocolate does not take capacious to reach the hearts of desktop programmers, providing a platform multiplatform and robust for developers. In its beginnings left much to be desired in the graphical interface, because the original graphics library, AWT (Abstract Window Toolkit), was much attached to the operating system and engaged in targeted bugs, that is to say, bugs specific to each operating system.This is a nightmare for any developer, since it is forced to test their application on each operating system. entirely with the appearance of Swing, the current library of graphical user interface, all these problems were solved.However, the biggest trade of Java now is aimed at server applications, offering in the platform J2EE a wide range of tools to develop secure systems, scalable and robust.Java, rather than a programming language, was developed considering a technology or framew ork. Three different flavors are distinguished, each focused on a specific needJ2ME Java Micro Edition, destined for develop mobile applications. It is developed considering the limited resources that have a mobile device.J2SE Java Standard Edition, for the world of desktop applications. It is the core of the language containing the base of the API (Application Programming Interface) this offers us.J2EE Java Enterprise Edition, for the systems business. It is built on J2SE, and with the addition of a large security API, giving the developer all the tools necessary.Today Java is present in every field of modern programming, from ph geniuss to biggest servers, but the secret of its success, beyond the great API that offers and its syntax, has been the JVM (Java Virtual Machine), the key piece in this masterpiece.It is responsible for rendering the byte autograph and executes the statements. It withal contains the Garbage Collector, a collection of resources unattainable in the appl ication, which allows the developer to concentrate on the logic, and worry less about the memory leaks.What is Java?Ok, we saw the tale of Java, but what is Java?In theory is defined as a multiplatform language and object-oriented, but these are terms that only a technical individual can understand. In plain and simple terms, Java is a programming language able to run on any in force(predicate) system and implements a paradigm that facilitates the maintenance of the application.Java, like any programming language object-oriented, depends on Classes and Objects. A division is nothing more than a template from which an object is created. But once again, this can only be understood by a technical user. In plain words, a class is a blueprint from which it is likely to construct a building.We know that from a class we can construct an object, but what is an object? Simple, an object is an instance of a class. Following our previous example, a building would be an object (since it wa s built from a plane).The objects in the real world have attributes and functions. For example a human being is an object with some(prenominal) attributes color, weight, height, attitude, and also has several functions eating, walking, talking, etc.The same concept applies to objects in Java an object has attributes and functions. Attributes describe the object and functions are the actions that objects can execute. For example, the object calculator whitethorn have the attribute buttons and the function add.We have already seen part of object-orientation, but what can be a multiplatform? To explain this concept we have to introduce another(prenominal) machine code. For machine code we refer to instructions a computer can understand. The disadvantage is that code should be written individually for each operative system so for example if we develop an application in machine code, we have to write that code different ways according to the operative system. present comes into play ou r friend multiplatform. When we say that a language is multiplatform, refers to the fact that the same code runs on any operative system. Yes, only be developed once and our application lead be able to run on any platform.Java SyntaxWe already know the story and what is Java, but how to use Java? Before this, we should know talk java we must know its syntax.Syntax is the set of laws and regulations must be followed when we are developing in Java. It is a crowd like the spelling rules which exist in all human language.In all syntax of any programming language there are keywords or silent words. What is this? Nothing more than words reserved by Java for personal use and therefore the programmer can not use it in his code.These keywords areabstract continue for new switchassert default goto package synchronizedboolean do image private thisbreak retell implements protected throwbyte else import public throwscase enum instance of return transientcatch extends int ill-judged trycha r final interface motionless voidclass finally long strictfp volatileconst float native super whileEach of these keywords serve a function in Java, but we will them see later.As we saw previously, Java is object oriented, so has attributes and functions. In the world of Java these are called variables and methods. A variable is a reserved space of memory, that means a data container. Each variable must have a data type. A what? A data type is what grade of values this variable can hold amounts, characters, Boolean, dogs, cats, etc. The syntax for declaring a variable in Java isaccess modifier behavior modifier datatype nameLater we will see what each one of them is about.We saw the variables or attributes, but what about functions? From now on we will call them methods. One method is a block of code to be execute in an orderly and sequential way. The syntax for declaring a method in Java isaccess modifier behavior modifier return type name parameters exceptions body of the method Again, do not worry about knowing what that means for now.We have seen the objects, but it is time to see the classes. As noted above, a class is a template from which an object is created, therefore, the class must contain all the entropy that describes the object. The syntax for declaring a class in Java isaccess modifier behavior modifier name bodyJava Access ModifiersPreviously we saw these words repeated several times, access modifier, but what is this? From a technical point of view, these are restrictions that attach to portions of a class, access restrictions, meaning, who can and who cannot access them.In Java there are four access modifiers, and three of them are keywords of the languagepublic, protected, private and default.default modifier This is the modifier that assigns the virtual machine to any member if no one has been told directly. This modifier restricts use of the member only classes that are tell inside the same package as this one.public Is the modifier m ost permissive of all, because gives to the member access to any class say with this switch.protected Is the second most permissive. It is identical to the modifier by default, only extending access to any class that inherits from the class containing the member. Inherit? Yes, classes can be inherited, but we will see later.private Is the modifier most restrictive of all. A member declared with this modifier can only be accessed from indoors the class.As mentioned above, public, protected and private are keywords in Java and can not be used as identifiers, that is, as class names, variables or methods.Java Behavior ModifiersI assume the name is very intuitive, these modifiers act on how in which a member behaves. In total, they are seven and are also keywords of Java. These arestatic When a member is declared as static, ceases to belong to an instance of an object and becomes part of a class.abstract When a member is declared as abstract, this member will lack of implementation an d will take only a signature.synchronized When a member is declared synchronized, this member will restrict his access to only one thread at a time.strictfp When a member is declared with this modifier, floating point values shall be governed by a set of special rules and will depend on the implementation of each Virtual Machine.volatile Changes made to a volatile member is impressive only if each of them go into effect, that means, if the value is changed three times, these three changes come into effect only if the three changes go into effect.native A member declared as native will possess the body of its definition in machine code.final This indicates what value of a member can not be changed.Java Data typesWe mentioned previously a data type refers to what types of values may contain a variable. In Java there are raw(a) data and reference data. Primitives are those that are not defined in a class and reference is the contrary, are those that are defined by a class.All primiti ves are keywords in the language and are the followingbyte Refers to a whole numeric value with a limit of 8 ashort refers to a whole numeric value with a limit of 16 bitsint refers to a whole numeric value with a limit of 32 bitslong refers to a whole numeric value with a limit of 64 bitsfloat refers to a decimal value with a limit of 32 bitsdouble refers to a decimal value of 64 bitschar refers to a character and has a limit of 32 bitsboolean refers to a Boolean value, that is two states. summon types can be any existing class in the Java API or defined by the user.Java Our First StepsWe have master the theory, but go to practice. We know the syntax to declare a class and its members so here we gopublic class HelloWorld private final int number = 5public static void main (String args) System.out.println (number)All this should go in a document with the same name of the class and end in (. java), in our case would be a document HelloWorld.javaWe have just seen the most basic examp le, a class declared public with the name HelloWorld. It contains a private variable and constant, a public and static method, which sends to print on console the value of the variable number.But writing this code is not enough, we must now compile. Java offers a set of tools for developers called JDK (Java Development Kit) and these include a compiler.To compile this code we go to a console and typejavac HelloWorld.javaTo run our code we must use another tool found in the JDKjava

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.