Java Programming Language

Java Programming Language – Coding Tutorial

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.

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.

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.

For more information about Cheap Download Software and Cheap Downloads please visit us.

This article is free for republishing
Source: http://www.articlealley.com/article_915553_11.html

Get vital knowledge about the topic of Forget Article Marketing, Try This Free System That Blow It Away! – please make sure to go through this site. The times have come when concise information is really only one click away, use this possibility.

Tags:

Microsoft Access Database Structure

Microsoft Access database has several objects such as table, form, query and report. And when we create MS Access table, all information we enter into the table will be stored in columns or fields. Field is a part of the table, which cannot be made without it. Up to 255 fields can be stored in the table, even though it is recommended to have a smaller amount. The more fields you create in the table, the more information will be stored and the bigger the table will get. Smaller amount of data and fields leads to better database performance, while bigger files can lead to database corruption.

Fields have different data types and when you create Access fields, it is important to select the right data type. It is possible to store a price as a text data type, of course. But it would be better to store it as a numeric data type. It might lead to a lot of problems and confusions, if you need to perform calculations with the data, but it is stored in text data type.

Text data type field can hold text or a text and numbers combination. It can hold such data as post code and telephone number as well.

Memo data type is great for storing large texts. There are times, when you need to add long descriptions or notes to your database. This is when you would use memo data type

There is also number data type, which is used for entering numeric information like monetary amounts or unit price. Actually, any data type, which can be used in calculations, should be stored in number data type field.

The date/time data type field is perfect for storing dates and time and years from 100 till 9999.

Fields with currency data type are used to store values used in calculations that have one to four decimals. You can also add a currency symbol next to the value.

Autonumber field increments by one every time you add a new record. This field data type is good for storing unique record identifier or primary key.

Yes/No field data type is used to store true or false values. You can only store one of two values in this field.

OLE objects data type field are used to store objects that are embedded in Access table as images, Word documents, sounds or Excel spreadsheets.

In hyperlink field you can store hyperlink web address that is used to link to website or Access object such as a report or form.

You can also use MS Access fields as controls in forms, which can be very useful for performing different tasks. It is worth spending some time to define the right data type for your MS Access field, when you design your database, because it may save you time and some database problems in future.

The sphere of computers and computer applications grows all the time. But you can turn this issue into your strong point by catching up with this knowledge and becoming a pro, for example in microsoft access database niche.

Please visit this web site that is dedicated to microsoft access database topic and has a nice line of microsoft access database products available.

Tags: ,

Microsoft Access Database Is The Best For Storing Your Business Data.

Some time ago, spreadsheets were enough for storing and managing data used to perform certain jobs. Now, there is much more data used in many companies by many employees, so spreadsheets are no longer sufficient for many people. Spreadsheets had to be replaced by databases as a tool of choice for a lot of people. But, due to the scope and flexibility of databases, they are often difficult to learn for many users. There are many classes that help people to fill this gap. So, many people take Microsoft Access training courses, which provide basic knowledge of using this database to beginners. But before taking such classes, you should define whether you or your business needs Microsoft Access database training for performing better job. Here is an overview of the application and some strategies you can use to learn it.

Microsoft Access is a database, which manages information. If you have a hard time understanding how it is used, you can imagine a spreadsheet, which has 100 columns and 50.000 rows. If you compare MS Access database to Excel spreadsheet, the latter is much more limited. Excel offers a much smaller lever of flexibility for manipulating data. While using Access database, you are able to store, organize and modify information as well as compile the data held in fields and generate reports.

The main challenge, which you will face while learning the Access database, is the level of software robustness. Due to the level of its flexibility for manipulating data, the application becomes more difficult to learn. So, people are trying to find ways to learn Access database in different ways to get better results. One of the ways people can learn MS Access is to read books on the subject. As for the popular Access manuals, you will not find a lot of useful information there. While in more detailed books, you will be able to get more valuable tips and techniques on using the database. But this learning approach is not for everyone. Not everything can be learned just by reading a book and not all people take information effectively this way. Such complex material cannot be perfectly mastered simply by learning theory. A much better result you will get through learning and practicing the material with Access training instructors.

The most effective way to learn for most people is applying the theory taught. Only through hands-on experience combined with good theoretical knowledge you are able to really learn the subject or master such software as MS Access. In learning such complex database like Access, training with instructors is definitely ahead of all other learning options. You have the benefit of communicating with your instructors and ask them any Access questions you have along the entire course. So, if you have decided to master Microsoft Access database, you should look for reliable training course in your area.

Anything about microsoft access database: great training information, all sorts of business products (customized for your needs), special microsoft access database blog with tips and advice about MA databases.

All this and more from a trustworthy UK based company which majors at microsoft access database and is assisting clients all over the world.

Tags: ,

  Domain Name + 1GB Linux India Web Hosting in Rs.349