I am studying File Input/Output, and I found that Java can read and write .dat class files. What is a .dat file? I know that Java can read .txt files, so is it similar or the same? What is the use of .dat files?
Asked
Active
Viewed 2,859 times
0
-
3.dat is short for 'data' which you might note is a vague term. .dat files are often (but not always) text. – Andrew Thompson Dec 31 '13 at 13:42
-
1check this [link] http://stackoverflow.com/questions/3373155/how-to-open-a-dat-file-in-java-program – Darshan Patel Dec 31 '13 at 13:44
2 Answers
3
.dat file is basically a file that contains data. Many programs use .dat format to store data. There is no way to tell what kind of data the file contains unless you open it. Also, you can never know how to read it unless you know what kind of data is present in it.

Adarsh
- 3,613
- 2
- 21
- 37
1
It is just a data file, no standards are defined. It can be character data, byte stream. eg. GOM video player tries to interpret .dat as byte stream. but u can also create a character stream, rite to file with extension .dat. GOM player just says unable to read.

harshal
- 592
- 6
- 25