Tekdowts
Java
- why floating values should not be compared using ==? and instead by using Float.floatToIntBits() and then the returned integer values to be compared by using ==? Item8 in chap 3 of **Effective Java** book//
- Cloning should not be called with Constructors (new) if the class is NOT final! why? Item10 in chap3 of **Effective Java** book//
- Cloning with final classes, final variables, final methods! - check and discuss [Effective Java book]
Java - Files
- How to append the data to the file? -> Use the append mode as "true" in the constructor of the FileWriter as
FileWriter f = new FileWriter(new File("fileName.txt"),true);
By default, it is taken as false and that's the reason, it inserts/replaces the contents instead of appending to the end of it.
See the following links
http://forum.java.sun.com/thread.jspa?threadID=701756&messageID=4070433
- How to append the content into t he top instead of the bottom/end? —> There is no such built in way. You have to do it manually with the contents on your own. Do it whatever you like (bottom-up or top-down :)).
- afd
Unix
- How to check the logged in user's details with respect to the group he belongs to etc., — the command whoami just gives the user name. But is there any other rescue? - 11 March 2009, Wednesday 11 PM IST.
page revision: 5, last edited: 11 Mar 2009 18:02