Java View all facts Glossary Help |
object > string |
string | ||||
subject | fact |
string | allows access to its characters using the charAt method as in: stringName.charAt(index) | |
can return the number of characters it contains using the length() method as in:stringName.length() | ||
cannot have characters added, deleted or inserted | ||
consists of a collection of characters | ||
has zero-based indexing | ||
is an instance of the String class | ||
is not an array of characters like in C and C++ | ||
is a subtopic of Variables and Data Types | ||
is a kind of object | ||
see also String class | ||
to concatenate you use the + operator | ||
object | when an object is created
| |
| ||
can access all instance variables of all objects of its class | ||
can be converted into a string using the toString method | ||
can be referred to without reference to the instance variables contained in it | ||
can be referred to by several different variables at the same time | ||
can communicate with every object to which it has access through its public interface | ||
can convert itself to a string representation using the toString method | ||
can model | ||
can notify other objects that a condition variable has changed | ||
can receive messages from
| ||
can represent any entity to which you can associate properties and behaviour | ||
can send messages to
| ||
can wait on 0 or more condition variables | ||
communicates with other objects by sending and receiving messages | ||
has example of creation String name = new String(); | ||
has part public interface | ||
hides methods from other objects using the 'private' keyword | ||
inherits instance methods and instance variables from | ||
is created by
| ||
shares every instance method of its class with the other instances of its class | ||
shares its implementation with other instances of its class | ||
shares one copy of each class variable of its class with the other instances of its class | ||
to create you use the new operator |
Next object: thread Up: object Previous object: instance of wrapper class