Rollerball
Rollerball

Reputation: 13108

RandomaAccessFile, what is actually random?

Having read this oracle java link I would like to know what the writers of this class exactly meant by the term "Random", if the buffer has its own position, limit, capacity indicators. What would be randomly done? I think I am just misinterpreting the word Random in that context. Is anybody able to clarify the point in other terms? Thanks in advance.

Upvotes: 1

Views: 38

Answers (1)

stinepike
stinepike

Reputation: 54672

Random access refers to the ability to access data at random. The opposite of random access is sequential access. To go from point A to point Z in a sequential-access system

For example in Random access file you can access any random position where you want, but for sequential access file you have to go from beginning to that specific point to get the data

according to wikipedia

random access (sometimes called direct access) is the ability to access an element at an arbitrary position in a sequence in equal time, independent of sequence size. The position is arbitrary in the sense that it is unpredictable, thus the use of the term "random" in "random access"

you can also see this link (or thousands of other search results) to get a clear idea about "random access"

Upvotes: 2

Related Questions