There are a few apps in the market which will do the same job.. but still this is free & the easiest way to do it.
1. Open Root Explorer
2. Navigate to System folder
3. Open the file name build.prop
4. Scroll down and under 'Additional_build_properties' look for the line ro.sf.lcd_density = 240...