896 Files and Streams Chapter 16 impressive functions (Vps web hosting)
896 Files and Streams Chapter 16 impressive functions performed by computers involve only the most fundamental manipulations of 0s and 1s. The smallest data item in a computer can assume the value 0 or the value 1. Such a data item is called a bit (short for binary digit a digit that can assume one of two values). Computer circuitry performs various simple bit manipulations, such as examining the value of a bit, setting the value of a bit and reversing a bit (from 1to 0 or from 0to 1). It is cumbersome for programmers to work with data in the low-level form of bits. Instead, programmers prefer to work with data in such forms as decimal digits (0 9), letters (A Z and a z), and special symbols (e.g., $, @, %, &, *, (, ), -, +, “, :, ?, / and many others). Digits, letters and special symbols are known as characters. The computer s character set is the set of all characters used to write programs and represent data items. Computers can process only 1s and 0s, so a computer s character set represents every character as a pattern of 1s and 0s. Characters in Java are Unicode characters composed of 2 bytes. Bytes are most commonly composed of eight bits. Programmers create programs and data items with characters. Computers manipulate and process these characters as patterns of bits. See Appendix K for more information on Unicode. Just as characters are composed of bits, fields are composed of characters or bytes. A field is a group of characters or bytes that conveys meaning. For example, a field consisting of uppercase and lowercase letters can be used to represent a person s name. Data items processed by computers form a data hierarchy in which data items become larger and more complex in structure as we progress from bits, to characters, to fields, etc. Typically, several fields (called instance variables in Java) compose a record (implemented as a class in Java). In a payroll system, for example, a record for a particular employee might consist of the following fields (possible data types for these fields are shown in parentheses following each field): Employee identification number (int) Name (String) Address (String) Hourly pay rate (double) Number of exemptions claimed (int) Year-to-date earnings (intor double) Amount of taxes withheld (intor double) Thus, a record is a group of related fields. In the preceding example, each of the fields belongs to the same employee. Of course, a particular company might have many employees and will have a payroll record for each employee. A file is a group of related records.1 A company s payroll file normally contains one record for each employee. Thus, a payroll file for a small company might contain only 22 records, whereas a payroll file for a large company might contain 100,000 records. It is not unusual for a company to have many files, some containing millions, or even billions, of characters of information. Figure 16.1 illustrates the data hierarchy. 1. More generally, a file can contain arbitrary data in arbitrary formats. In some operating systems, a file is viewed as nothing more than a collection of bytes. In such an operating system, any organization of the bytes in a file (such as organizing the data into records) is a view created by the applications programmer.
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.