Results 1 to 8 of 8

Thread: Introduction to JAVA language

  1. #1
    Join Date
    Mar 2008
    Posts
    192

    Introduction to JAVA language

    I thought to give some fundamental information about the Java programming language due to which many new learners will get some help.

    Introduction :

    Java is programming language all its own characteristics to describe algorithms, ie its own foundations of language. This manual is not intended as an exhaustive description of all the ways that we can "express" in this language, but a base to be creating our small programs. I think it is much more useful as you begin to program these things are best learned when we have to solve a problem during our work. To enter simply point out that Java has a syntax similar to C + + so that programmers who come from this language will feel very comfortable in it.

    Comments :

    There are three types of comments in Java :
    • // This is a one-line comment
    • /* This is a comment on one or more lines */
    • /** This is a documentation comment */


    Identifiers :

    An identifier is a "name" that allow us to target specifically to an entity's own language, ie, are the names we can bring them to our / as variables, methods, classes, interfaces and objects. The only restriction on the formation of IDs is that they start with letter, underscore or the '$' sign, then follow letters or numbers. Keep in mind that in Java as in many other programming languages are case-sensitive. A highly recommended set of rules for creating identifiers in Java: Java is common in type all lowercase identifiers taking into account the following exceptions :
    • If we want to include an identifier in a compound name becomes the first full name in lowercase and the rest with the first letter capitalized and the rest in lowercase.
    • The class and interface identifiers always begin capitalized following the previous rule in case of a compound name.
    • The final variable names (the most frequently named "constants") are written entirely in capital letters.

  2. #2
    Join Date
    Mar 2008
    Posts
    227

    Re: Introduction to JAVA language

    It is important to distinguish between the concepts of class and object. Class is an abstract model of an object type. Defines methods and attributes. This is an instance of a class, ie the deployment with an abstract model values. The classes are not independent entities but are grouped hierarchically inherited characteristics and attributes. Each instance or actual implementation of a class will be a new object so that you can create infinitely many different objects from a single class.

  3. #3
    Join Date
    Mar 2008
    Posts
    258

    Re: Introduction to JAVA language

    The beginners also should know about the Encapsulation. It is defined as the process of packing together the methods and data in an object. The object is responsible for hiding your data to other objects. The encapsulation allows greater security of access to data and that this access depends directly on each object. It also allows to abstract the internal details of operation of the object.

  4. #4
    Join Date
    Oct 2008
    Posts
    167

    Re: Introduction to JAVA language

    The main objective of the designers of Java, and given the high growth of networks in recent years, was to develop a language which once compiled applications could be immediately executable on any machine and any operating system. For example, a program developed in Java on a Sun workstation that uses the Solaris operating system, it should be possible to bring a PC running Windows NT operating system. Java designers tried to maintain the basic facilities of the language to a minimum and provide a large number of extras with class libraries. The aim was to build a programming language that was safe, that is, that it could not access system resources in an uncontrolled manner. For this reason we removed the ability to manipulate the memory by using pointers and the ability to transform numbers into memory addresses (as is done in C) thus avoiding any illegal access to memory. This is assured because the Java compiler makes a systematic check of conversions.

  5. #5
    Join Date
    Aug 2006
    Posts
    227

    Re: Introduction to JAVA language

    The great novelty of Java within the new generation browsers is the ability to shift control of the interactivity of the servers to the machines of users who are used to explore the Internet. For the same structure of language, new browsers allow the downloading of applets, small fragments of compact programs, precompiled, which can then interpret differently the data downloaded to produce such animations, sound and especially true interactivity. The Java language, as seen from an Internet browser, is it a language that is neither fully understood nor fully compiled. The language becomes a code similar to elementary assembly, also called p-code or byte-code.

  6. #6
    Join Date
    Jul 2006
    Posts
    286

    Re: Introduction to JAVA language

    It has the distinction of being compact and thus can be compiled (translated into machine language) very quickly, in the course of implementation of the program itself. The p-code is an intermediate layer that greatly facilitates the portability of an environment or from one machine to another. The easy to achieve the point of disappearing. This opens the "virtual machine". A virtual machine is a logical layer that makes believe the Java program running on a real computer (with registers, memory and processor), when in fact it is a logical reconstruction of a computer.

  7. #7
    Join Date
    Jul 2006
    Posts
    442

    Re: Introduction to JAVA language

    It is also a portable language, meaning it adapts to a variety of different platforms. This is one of the qualities of Java (which leads to a quality defect that we will speak just after). With a virtual machine, Java can run on an incredible amount of platforms. The role of the Java machine is simple: when you install the Java virtual machine, it can run on the architecture of the current computer instructions. A Java virtual machine for Mac and PC is totally different, but will do the same in the end (the user perspective). The JAVA program will remain the same, hence the excellent portability of this language.

  8. #8
    Join Date
    Jul 2006
    Posts
    289

    Re: Introduction to JAVA language

    Only different virtual machines between different platforms. This quality is at high default: the JAVA program is compiled first, then the virtual machine interprets the "compilation" that has been made. Java is slower than C + +. The advantage of this language is that it can create real applications, and better, executable from an applet (look at the antivirus online site, it is a Java applet). If you successfully want to learn Java, I highly recommend that you only print the sample solutions and see if you all ready own practice examples have already been programmed, so only at the end of the course.

Similar Threads

  1. BlackBerry Playbook: Java language error Http status 500
    By Zelman in forum Portable Devices
    Replies: 5
    Last Post: 21-05-2011, 10:34 AM
  2. Introduction to Java Server Faces
    By The$Hulk in forum Guides & Tutorials
    Replies: 8
    Last Post: 28-09-2010, 01:38 AM
  3. Replies: 5
    Last Post: 16-01-2010, 08:53 AM
  4. Advice on the Java as Programming Language
    By Muhammad Waqar in forum Software Development
    Replies: 5
    Last Post: 05-01-2010, 09:28 PM
  5. Mobile programming language Java or C++
    By VinFanatic in forum Software Development
    Replies: 2
    Last Post: 20-04-2009, 09:11 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,538,797.82083 seconds with 17 queries