4

The API shows .tmp, my text book uses .dat and I've seen .ser
Does it matter?

I'm writing an arraylist of objects

Nicolas
  • 331
  • 4
  • 13

3 Answers3

4

Extensions doesn't matter. You could also use your name nicolas as extension too. Extensions are for OS to associate files to particular program.

Prazzy Kumar
  • 994
  • 1
  • 11
  • 16
  • 1
    so it would be best to not use an existing extension like txt or something? – Nicolas May 12 '14 at 06:21
  • *Extensions are for OS to associate files to particular program* that works on Windows OS. In Unix based OSes, the file is associated by the starting bytes in the file, the file extension is just for decoration purposes. – Luiggi Mendoza May 12 '14 at 06:23
  • yeah!! go for it!!! Even if u use .dat or .ser other OS editors wont be able to interpret it properly. So its better to use custom extensions thus user wont be trying to open it in notepad mediaplayer etc. – Prazzy Kumar May 12 '14 at 06:23
3

You can use any custom extensions. Extensions are meant to identify default program for the file. For example, abc.txt file should be opened with text programs. You can change extension of your video file to .txt and your computer will try to open it with text processing program. Hence, you can provide any extension unless you want to open file by particular program.

SaurabhJinturkar
  • 554
  • 7
  • 20
3

Many people use .ser. You could use .bin, anything you like really, except the ones that indicate text: .txt, .doc, etc. It's binary, not text.

user207421
  • 305,947
  • 44
  • 307
  • 483