Monday, August 5, 2013

Introduction of Java Programming

Introduction to Computing with Java

Java is a simple but powerful programming and object-oriented and is in many ways similar to C + +. Java originated in Sun Microsystems, Inc. in 1991. E 'was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. has been developed to provide a platform-independent programming language. This site provides an introduction to programming in Java, with many examples of Java. It is a complete course for beginners Advanced Java Programming for Java.





Platform independent

Unlike many other programming languages ​​such as C and C + +, Java is compiled, it is compiled into platform specific machine, not the platform independent bytecode. This byte code is distributed via the Internet and interpreted by the virtual machine (JVM) in which the platform is running.

Java Virtual Machine

What is the Java Virtual Machine? What is your role?

Java was designed with a concept of "write once, run anywhere." Java Virtual Machine has a central role in this concept. The JVM is the environment in which Java programs are executed. This is a software that is distributed on top of real hardware and operating system. When you compile the source code (. Java), which translates bytecode and then placed in the file (. Class). The JVM executes this bytecode. So Java bytecode can be considered as the machine language of the JVM. A JVM can either interpret the bytecode one instruction at a time or the bytecode can be compiled further for the real microprocessor using what is called a just-in-time. The JVM should be implemented on a particular platform before compiling programs can run on that platform.

OOP  (Object Oriented Programming)

Since Java is an object-oriented programming has the following features:

  • Code reuse
  • The emphasis on data rather than procedure
  • Data is hidden and can not be accessed by external functions
  • Objects can communicate among them through the functions
  • New data and functions can be easily addedJava has powerful features. 


The following are some of them: -

  • Simple
  • Reusable
  • Portable (platform independent)
  • Distributed
  • Robust
  • Secure
  • High Performance
  • Dynamic
  • Screwed
  • Performed

Object-oriented programming is a method of execution in which the programs are organized in cooperative collection of objects, each of which represents an instance of a class, and whose classes are all members of a hierarchy of classes connected by inheritance relationships.

Concepts of object-oriented programming

Four principles of object-oriented programming are

  1. Abstraction
  2. Encapsulation
  3. Inheritance
  4. Polymorphism


Abstraction

Abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide the conceptual boundaries well defined, regarding the point of view of the viewer.

Encapsulation

Encapsulation is the process of partitioning the elements of an abstraction that constitute its structure and behavior, encapsulation serves to separate the contractual interface of an abstraction and its implementation.

Encapsulation

* Hides the implementation details of a class.
* Forces the user to use a data access interface
* It makes the code easier to maintain.

Inheritance

Inheritance is the process by which an object acquires the properties of another object.

Polymorphism

Polymorphism is the existence of classes or methods in different ways or only name that denotes different
implementations.

Java is distributed

With a wide range of routine to handle the TCP / IP protocol such as HTTP and FTP java can open and access objects across the network via URLs.


Java is multithreaded

One of the strengths of the Java language is that it allows multiple threads that execute the same program simultaneously on a single Java program can have many different threads running independently and continuously. Multiple Java applets can run in the browser at the same time sharing the CPU time.

Java is secure

Java was designed to allow safe execution of code across the network. To make sure Java many of the features of C and C + + have been removed. Java does not use. Java programs can not access arbitrary addresses in memory.

Garbage collection

Automatic garbage collection is another great feature of Java with the memory avoiding accidental damage. As in C + +, Java has a new operator to allocate memory on the heap for a new object. But it uses operator delete to free memory, as it does in C + + to free the memory when you no longer need the object. This is done automatically by the garbage collector.

Java Applications

Java has evolved from a simple language that provides interactive dynamic content for web pages with a programming language by companies registered mainly suitable for the development of important applications and critics. Today, it is used for many types of applications, including Web-based financial applications, gaming applications, embedded systems, distributed business applications, mobile applications, image processors, desktop applications, and more. This website describes the basic components of java that say some examples of Java, along with some Java tutorials.

SHARE THIS

Author:

Facebook Comment

0 comments: