123ArticleOnline Logo
Welcome to 123ArticleOnline.com!

ALL >> Computer-Programming >> View Article

Learn About Java, What It Is And Why It Is So Popular

By Author: siyaram ray
Total Articles: 55

Inside Java offers a glimpse behind the Java platform, and related technologies. In this month's column, I'll show you an overview of the Java programming language.
Java - an island of Indonesia, a type of coffee, and a programming language. Three very different meanings, each in varying degrees of importance. Most programmers, though, are interested in the Java programming language. In just a few short years (since late 1995), Java has taken the software community by storm. Its phenomenal success has made Java the fastest growing programming language ever. There's plenty of hype about Java, and what it can do. Many programmers, and end-users, are confused about exactly what it is, and what Java offers.
Java is a revolutionary language
The properties that make Java so attractive are present in other programming languages. Many languages are ideally suited for certain types of applications, even more so than Java. But Java brings all these properties together, in one language. This is a revolutionary jump forward for the software industry.
Let's look at some of the properties in more detail: -
• object-oriented
• portable
• multi-threaded
• automatic garbage collection
• secure
• network and "Internet" aware
• simplicity and ease-of-use
Object-oriented
Many older languages, like C and Pascal, were procedural languages. Procedures (also called functions) were blocks of code that were part of a module or application. Procedures passed parameters (primitive data types like integers, characters, strings, and floating point numbers). Code was treated separately to data. You had to pass around data structures, and procedures could easily modify their contents.
Java is an object-oriented language. An object-oriented language deals with objects. Objects contain both data (member variables) and code (methods). Each object belongs to a particular class, which is a blueprint describing the member variables and methods an object offers. In Java, almost every variable is an object of some type or another - even strings. Object-oriented programming requires a different way of thinking, but is a
Portable
Most programming languages are designed for a specific operating system and processor architecture. When source code (the instructions that make up a program) are compiled, it is converted to machine code which can be executed only on one type of machine. This process produces native code, which is extremely fast.
Another type of language is one that is interpreted. Interpreted code is read by a software application (the interpreter), which performs the specified actions. Interpreted code often doesn't need to be compiled - it is translated as it is run. For this reason, interpreted code is quite slow, but often portable across different operating systems and processor architectures.
Java takes the best of both techniques. Java code is compiled into a platform-neutral machine code, which is called Java bytecode. A special type of interpreter, known as a Java Virtual Machine (JVM), reads the bytecode, and processes it. Figure One shows a disassembly of a small Java application. The bytecode, indicated by the arrow, is represented in text form here, but when compiled it is represented as bytes to conserve space.


Multi-threaded
If you've ever written complex applications in C, or PERL, you'll probably have come across the concept of multiple processes before. An application can split itself into separate copies, which run concurrently. Each copy replicates code and data, resulting in increased memory consumption. Getting the copies to talk together can be complex, and frustrating. Creating each process involves a call to the operating system, which consumes extra CPU time as well.
A better model is to use multiple threads of execution, referred to as threads for short. Threads can share data and code, making it easier to share data between thread instances. They also use less memory and CPU overhead. Some languages, like C++, have support for threads, but they are complex to use. Java has support for multiple threads of execution built right into the language. Threads require a different way of thinking, but can be understood very quickly. Thread support in Java is very simple to use, and the use of threads in applications and applets is quite commonplace.
Automatic garbage collection
No, we're not talking about taking out the trash (though a computer that could literally do that would be kind of neat). The term garbage collection refers to the reclamation of unused memory space. When applications create objects, the JVM allocates memory space for their storage. When the object is no longer needed (no reference to the object exists), the memory space can be reclaimed for later use.
Secure
Security is a big issue with Java. Since Java applets are downloaded remotely, and executed in a browser, security is of great concern. We wouldn't want applets reading our personal documents, deleting files, or causing mischief. At the API level, there are strong security restrictions on file and network access for applets, as well as support for digital signatures to verify the integrity of downloaded code. At the bytecode level, checks are made for obvious hacks,
Network and "Internet" aware
Java was designed to be "Internet" aware, and to support network programming. The Java API provides extensive network support, from sockets and IP addresses, to URLs and HTTP. It's extremely easy to write network applications in Java, and the code is completely portable between platforms. Java also includes support for more exotic network programming, such as remote-method invocation (RMI), CORBA and Jini. These distributed systems technologies make Java an attractive choice for large distributed systems.

Total Views: 12Word Count: 895See All articles From Author

Computer Programming Articles

1. Using Selenium For Short And Long Of Waits In Web Applications
Author: Siyaram Ray

2. Cross Currency Payment In Oracle Fusion Financials Payment Work Bench :
Author: Vishal

3. Python Oops Concepts
Author: Infocampus

4. Wearable Computing Devices App Development
Author: mtoge

5. Font Family In Css
Author: Tipsfor123456 Tipsfor

6. List Property In Css
Author: Tipsfor123456 Tipsfor

7. Border Property In Css
Author: Tipsfor123456 Tipsfor

8. Text Propeety In Css
Author: Tipsfor123456 Tipsfor

9. Introduction And Features Of Selenium Webdriver
Author: Siyaram Ray

10. Box Modal Property
Author: Tipsfor123456 Tipsfor

11. Background Property In Css
Author: Tipsfor123456 Tipsfor

12. Link Property In Css
Author: Tipsfor123456 Tipsfor

13. Float Property In Css
Author: Tipsfor123456 Tipsfor

14. Inline And Block Property In Css
Author: Tipsfor123456 Tipsfor

15. Padding Property In Css
Author: Tipsfor123456 Tipsfor

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: