A Guide To Java Programming
A Guide To Java Programming
Free Online Articles Directory
Why Submit Articles?
Top Authors
Top Articles
FAQ
AB Answers
Publish Article
0 && $.browser.msie ) {
var ie_version = parseInt($.browser.version);
if(ie_version Hello Guest
Login
Login via
Register
Hello
My Home
Sign Out
Email
Password
Remember me?
Lost Password?
Home Page > Computers > Programming > A Guide To Java Programming
A Guide To Java Programming
Edit Article |
Posted: Feb 01, 2010 |Comments: 0
|
Share
]]>
Syndicate this Article
Copy to clipboard
A Guide To Java Programming
By: Paul Guenther
About the Author
Anthony Rainey is a Blogger for Coding This. Learn more about coding and get Computer Programming Help: http://codingthis.com/ – Free White Papers: http://itknowledgehub.com/
(ArticlesBase SC #1807800)
Article Source: http://www.articlesbase.com/ – A Guide To Java Programming
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. This was a source of problems, as parts of a program could have unforeseen effects in other parts. Tracking down which procedure was at fault wasted a great deal of time and effort, particularly with large programs. You are reading the right article if it’s computer programming help that you seek.
In some procedural language, you could even obtain the memory location of a data structure. Armed with this location, you could read and write to the data at a later time, or accidentally overwrite the 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 better way to design software than procedural programming.
There are many popular object-oriented languages available today. Some like Smalltalk and Java are designed from the beginning to be object-oriented. Others, like C++, are partially object-oriented, and partially procedural. In C++, you can still overwrite the contents of data structures and objects, causing the application to crash. Thankfully, Java prohibits direct access to memory contents, leading to a more robust system.
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. Learn more about these techniques with free white papers at IT Knowledge Hub.
Figure One – Bytecode disassembly for “HelloWorld”
The approach Java takes offers some big advantages over other interpreted languages. Firstly, the source code is protected from view and modification – only the bytecode needs to be made available to users. Secondly, security mechanisms can scan bytecode for signs of modification or harmful code, complimenting the other security mechanisms of Java. Most of all though, it means that Java code can be compiled once, and run on any machine and operating system combination that supports a Java Virtual Machine (JVM). Java can run on Unix, Windows, Macintosh, and even the Palm Pilot. Java can even run inside a web browser, or a web server. Being portable means that the application only has to be written once – and can then execute on a wider range of machines. This saves a lot of time, and money.
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.
Languages like C++ force programmers to allocate and deallocate memory for data and objects manually. This adds extra complexity, but also causes another problem – memory leaks. When programmers forget to deallocate memory, the amount of free memory available is decreased. Programs that frequently create and destroy objects may eventually find that there is no memory left. In Java, the programmer is free from such worries, as the JVM will perform automatic garbage collection of objects.
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, such as stack manipulation or invalid bytecode. The strong security mechanisms in Java help to protect against inadvertent or intentional security violations, but it is important to remember that no system is perfect. The weakest link in the chain is the Java Virtual Machine on which it is run – a JVM with known security weaknesses can be prone to attack. It is also worth noting that while there have been a few identified weaknesses in JVMs, they are rare, and usually fixed quickly.
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. In languages like C/C++, the networking code must be re-written for different operating systems, and is usually more complex. The networking support of Java saves a lot of time, and effort.
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.
Simplicity and ease-of-use
Java draws its roots from the C++ language. C++ is widely used, and very popular. Yet it is regarded as a complex language, with features like multiple-inheritance, templates and pointers that are counter-productive. Java, on the other hand, is closer to a “pure” object-oriented language. Access to memory pointers is removed, and object-references are used instead. Support for multiple-inheritance has been removed, which lends itself to clearer and simpler class designs. The I/O and network library is very easy to use, and the Java API provides developers with lots of time-saving code (such as networking and data-structures). After using Java for awhile, most developers are reluctant to return to other languages, because of the simplicity and elegance of Java.
This article is free for republishing
Source: http://www.articlealley.com/article_915553_11.html
Retrieved from “http://www.articlesbase.com/programming-articles/a-guide-to-java-programming-1807800.html”
(ArticlesBase SC #1807800)
Paul Guenther -
About the Author:
Anthony Rainey is a Blogger for Coding This. Learn more about coding and get Computer Programming Help: http://codingthis.com/ – Free White Papers: http://itknowledgehub.com/
]]>
Rate this Article
1
2
3
4
5
vote(s)
0 vote(s)
Feedback
RSS
Print
Email
Re-Publish
Source: http://www.articlesbase.com/programming-articles/a-guide-to-java-programming-1807800.html
Article Tags:
java, javascript, java programming, computer programming help, white papers, coding tutorial
Related Videos
Latest Programming Articles
More from Paul Guenther
Frozen Cinnamon Flavored Java Recipe
Learn how to make a frozen cinnamon flavored java to spice up your coffee. (00:57)
How to build Java applications using Servoy Developer
Learn how to build portable Java apps. Servoy has a lot to offer Java developers and a nice way to deploy multiuser Web 2.0 applications from a single code base.
Pros:
• All open source tools and methods here.
• A very rich visual programming environment that can quickly build apps.
Cons: There is a lot to get used to and the user interface is a bit hard to navigate.
Servoy USA, 299 W. Hillcrest Drive Suite 115, Thousand Oaks, CA 91360
(805) 624-4959, http://www.servoy.com
(03:32)
Ayumilove Haskell Programming Tutorial Part 1
Learn how to do write simple functional application like adding 2 or more integers and print out result.
This video includes some basic explanation and step by step guide to create simple program!
Download the sample code:
http://www.mediafire.com (03:42)
Ayumilove Haskell Programming Tutorial Part 2 A
Learn how to do write simple functional application like calculating the area of triangle using square root, and new functions like let and in, and print out result.
This video includes some basic explanation and step by step guide to create simple (05:57)
Ayumilove Haskell Programming Tutorial Part 4
Learn how to create a power function using haskell script. We will be using back recursion concept to complete this exercise/tutorial! created by Ayumilove!
Download link for material is provided. (03:51)
iPhone Application Development – Writing Applications for iPhone
Today in the ever changing world of technology, anybody might be tempted to get a number of additional features added to their iPhone. Even an amateur might can get into iPhone application. You may hire iPhone app developers to get your desired result. If that is a difficult task the easier option is of outsourcing iPhone application development.
By:
Jack Hardl
Computers>
Programmingl
Nov 11, 2010
PHP Development- Why Hire PHP Developer From India – Some of the Most Beneficial Reasons
PHP website development in India has seen a huge rise in the recent past and this is why it is highly beneficial to hire PHP developers from India. Read on to know the benefits.
By:
Abhimanyu Sharmal
Computers>
Programmingl
Nov 11, 2010
Application Development for Your Favorite Gadget Called the Blackberry
Programming for Blackberry is now being done on a bigger level as the number of Blackberry users is increasing significantly. With so many Blackberry users out there, professional application developers for Blackberry handsets have been poured with more responsibilities to create assorted range of applications.
By:
Arun Kumarl
Computers>
Programmingl
Nov 10, 2010
iPhone Applications Development: Making the iPhone More Feature-Rich and Functional
There has been quite an increase in the number of mobile applications development ever since the arrival of smartphones. Application development for mobile devices is different from developing conventional applications as these devices have limited storage capacity and less powerful processors.
By:
Arun Kumarl
Computers>
Programmingl
Nov 10, 2010
Custom Software Development – Necessity and Advantages
Every business aspires to be at the highest peak of Success for which one of the prime requisite is being flexible. To be parallel and adaptive to ever changing needs of the businesses readymade software turned incapable, lack of which custom software development became the answer for everyone.
By:
Vimal Ml
Computers>
Programmingl
Nov 10, 2010
6 month industrial project training – .Net Java Php Sql Server
We are offering Live Projects training for final year students of BCA, MCA, BE, BTech. Tathastu provides industrial project training on different technology like .Net, Java, J2EE, PHP, SQL server, Oracle and MySQL.
By:
Amit Kumarl
Computers>
Programmingl
Nov 10, 2010
Open Source Web Development- Some Do’s and Don’ts of Open Source Development
Open source development is one of the most beneficial forms of developing desired applications. But you need to take care of certain things to avoid any mishaps. Here is a list of do’s and don’ts.
By:
Abhimanyu Sharmal
Computers>
Programmingl
Nov 10, 2010
Hire PHP Programmer
In today’s competitive field of programming language PHP is the most popular and well known as web programming language. There are lot of many uses of PHP Programming language and PHP Programmer also for develop the Companies, big and small scale both. The causes are so simple because it’s highly secured, economical and gives a variety of developmental environments to create business applications of all size (company and firm) and variety.
By:
brandon jeffl
Computers>
Programmingl
Nov 10, 2010
Dental Supplies in an International Marketplace
I am looking to launch an online dental supplies store overseas. Before doing so, I would make sure to do research to get a better understanding of demand in international markets. First, I would look up sales and revenue information for the industry in the handful of countries that I would initially test.
By:
Paul Guentherl
Business>
Entrepreneurshipl
May 20, 2010
Top 10 Ways to Improve Your Self Image
When you exercise, your brain releases endorphins that make you feel happy. And of course exercise helps you to burn calories so you will be one step closer to your weight loss goals. When you make it a point to set aside 20-30 minutes several times a week to focus on fitness, you will have a little extra pep in your step and carry yourself with much more confidence.
By:
Paul Guentherl
Health>
Wellnessl
Apr 23, 2010
Working Better With Ruby on Rails
In the last four years, we have seen how Ruby on Rails (RoR) built on, and accelerated the wider acceptance of, the object-oriented Ruby language. Consequently, the Ruby/RoR combo has become a workhorse of such independent software providers as Nashua (NH)-based HyTech Professionals. Though busy as the proverbial bee, the development teams there gave me a peek at apps they use to produce more than a hundred web-facing projects year after year.
By:
Paul Guentherl
Computers>
Information Technologyl
Apr 22, 2010
Questions About Dental Implants
Dental implants are becoming extremely popular as a replacement for dentures or false teeth. Dentists all over the country are well versed in installing dental implants, so it is becoming as common place as a root canal. If you are considering having dental implants put in, you may need some additional information before you get started. Here are some of the most frequently asked questions about this procedure.
By:
Paul Guentherl
Health>
Dental Carel
Apr 22, 2010
The Male Plastic Surgery Patient
While it is true that the overall number of plastic surgery procedures performed in the past few years is up, and the number of men as a percentage of this total is increased, women still far outnumber male patients by about 10:1 for most practices. While male plastic surgery procedures are somewhat different from woman’s, their motivations for undergoing plastic surgery are also different.
By:
Paul Guentherl
Health>
Dental Carel
Apr 22, 2010
5 Great Tips For Fast Weight Loss
This article is going to show you five top tips for fast weight loss. The good news about these top tips is that they do not require that you starve yourself or go on any fad diet that can damage your long term health.
By:
Paul Guentherl
Health>
Wellnessl
Apr 15, 2010
The Common Causes Of Tooth Decay
It can be extremely embarrassing to have to deal with tooth decay. As the tooth rots and becomes discolored, the person whose mouth the tooth inhabits starts looking older by the day. Decaying teeth not only make a person look older, they can also seemingly make a statement about that person’s financial status (i.e., not having the resources to have the situation corrected), wrong or right.
By:
Paul Guentherl
Health>
Dental Carel
Apr 13, 2010
lViews: 118
Weight Loss And Depression – The Missing Link
Weight loss and depression are linked in many different ways. Getting into shape by eating healthier and by exercising will enable you to succeed with weight loss, while also improving the symptoms associated with depression or by making them disappear entirely. Take a look at all of the many powerful ways in which weight loss and depression are linked so you can be motivated to get on track.
By:
Paul Guentherl
Health>
Wellnessl
Apr 07, 2010
Add new Comment
Your Name: *
Your Email:
Comment Body: *
Verification code:*
* Required fields
Submit
Your Articles Here
It’s Free and easy
Sign Up Today
Author Navigation
My Home
Publish Article
View/Edit Articles
View/Edit Q&A
Edit your Account
Manage Authors
Statistics Page
Personal RSS Builder
My Home
Edit your Account
Update Profile
View/Edit Q&A
Publish Article
Author Box
Paul Guenther has 48 articles online
Contact Author
Subscribe to RSS
Print article
Send to friend
Re-Publish article
Articles Categories
All Categories
Advertising
Arts & Entertainment
Automotive
Beauty
Business
Careers
Computers
Education
Finance
Food and Beverage
Health
Hobbies
Home and Family
Home Improvement
Internet
Judaism
Law
Marketing
News and Society
Relationships
Self Improvement
Shopping
Spirituality
Sports and Fitness
Technology
Travel
Writing
Computers
Computer Forensics
Computer Games
Data Recovery
Databases
E-Learning
File Types
Hardware
Information Technology
Intra-net
Laptops
Networks
Operating Systems
Programming
Security
Software
]]>
Need Help?
Contact Us
FAQ
Submit Articles
Editorial Guidelines
Blog
Site Links
Recent Articles
Top Authors
Top Articles
Find Articles
Site Map
Webmasters
RSS Builder
RSS
Link to Us
Business Info
Advertising
Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2010 Free Articles by ArticlesBase.com, All rights reserved.