Permanent store in hard disk

How can I store an integer of string permanently in hard disk?Actually I want to assign a serial key to my program. Hence it is necessary to store that key permanently.Thanks in advance
[206 byte] By [thobaisa] at [2007-11-26 17:38:38]
# 1
Take a look at FileWriter and FileReaderKaj
kajbja at 2007-7-9 0:06:48 > top of Java-index,Java Essentials,Java Programming...
# 2
Oh yes! i got it. but is not there any other way like in c++ "register int a";
thobaisa at 2007-7-9 0:06:48 > top of Java-index,Java Essentials,Java Programming...
# 3
> Oh yes! i got it. but is not there any other way like> in c++ "register int a";What? I don't know what you mean by that.You can also use the Preferences API to store application configuration.Kaj
kajbja at 2007-7-9 0:06:48 > top of Java-index,Java Essentials,Java Programming...
# 4

> Oh yes! i got it. but is not there any other way like

> in c++ "register int a";

The keyword 'register' has nothing to do with persistency. The 'register'

keyword originates in very very old pre-ansi-C implementations. It was

supposed to tell the compiler to keep a simple int in a cpu register.

A severe complication arose from that 'register' keyword:

- a 'register int i' doesn't have an address, i.e. '&i' would be invalid

A temporary storage location had to be allocated for a copy of that 'i'

value in order to obtain the address of it. The register itself had to be

reloaded again afterwards. The conclusion was: it's a mess, let that

keyword just be an indication to the compiler, often to be ignored.

Current C or C++ compilers by large ignore that old fashioned 'register'

keyword. And it had and has nothing to do with any form of persistency

at all. Please know what you're talking about before you confuse people

by spraying buzzwords all over the place.

kind regards,

Jos

JosAHa at 2007-7-9 0:06:48 > top of Java-index,Java Essentials,Java Programming...
# 5
Sorry About that and anyway Thanks a lot for the information abt register. In fact i studied that long ago. sorry!
thobaisa at 2007-7-9 0:06:48 > top of Java-index,Java Essentials,Java Programming...