Anonymous - Chapter 10 ************************** 1. What...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 10 ************************** 1. What is I/O Stream? An I/O Stream represents an input source or an output destination. A stream can represent many different kinds of sources and destinations, including disk files, devices, other programs, and memory arrays. Streams support many different kinds of data, including simple bytes, primitive data types, localized characters, and objects. Some streams simply pass on data; others manipulate and transform the data in useful ways. ************************************* 2. Please simply describe the use of Byte streams. Programs use byte streams to perform input and output of 8-bit bytes. All byte stream classes are descended from InputStream and OutputStream. ************************************* 3. What is File I/O? File is a class that helps you write platform-independent code that examines and manipulates files and directories. Random access files support nonsequential access to disk file data. ************************************************************************************************ ************** ************************************************************************************************ ************* Chapter 8 ****************************** 1. What are the reasons of using a number object? There are three reasons that you might use a Number object rather than a primitive: 1.As an argument of a method that expects an object (often used when manipulating collections of numbers). 2.To use constants defined by the class, such as MIN_VALUE and MAX_VALUE, that provide the upper and lower bounds of the data type. 3.To use class methods for converting values to and from other primitive types, for converting to and from strings, and for converting between number systems (decimal, octal, hexadecimal, binary). **************************** 2. Describe at least 5 useful methods in the Character Class boolean isLetter(char ch) boolean isDigit(char ch) Determines whether the specified char value is a letter or a digit, respectively. boolean isWhitespace(char ch) Determines whether the specified char value is white space. boolean isUpperCase(char ch) boolean isLowerCase(char ch) Determines whether the specified char value is uppercase or lowercase, respectively. char toUpperCase(char ch) char toLowerCase(char ch) Returns the uppercase or lowercase form of the specified char value. toString(char ch) Returns a String object representing the specified character value that is, a one-character string. *************************** 3. What are Java Strings? Strings are a sequence of characters and are widely used in Java programming. In the Java programming language, strings are objects. The String class has over 60 methods and 13 constructors....
View Full Document

This note was uploaded on 02/07/2012 for the course MIS 523 taught by Professor Li during the Spring '11 term at Springfield.

Page1 / 6

Anonymous - Chapter 10 ************************** 1. What...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online