Aisee Vani Boliye, Mun Ka Aapa Khoye,
Apna Tan Sheetal Kare, Auran Ko Sukh Hoye!
Difference between final, finally and finalize()
Posted by: Prince in Interview Question No Comments »- final – constant declaration.
- finally – The finally block always executes when the try block exits, except System.exit(0) call. This ensures that the finally block is executed even if an unexpected exception occurs. But finally is useful for more than just exception handling — it allows the programmer to avoid having cleanup code accidentally bypassed by a return, continue, or break. Putting cleanup code in a finally block is always a good practice, even when no exceptions are anticipated.
- finalize() – method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state. Should not be used to release non-memory resources like file handles, sockets, database connections etc because Java has only a finite number of these resources and you do not know when the garbage collection is going to kick in to release these non-memory resources through the finalize() method.
In simple words::
final variables are unchangeable.
final classes are not subclassed.
final methods are not overriden.
finilize() to clean up memory resourses for object using finilize().
finally block is executed if exception thrown or not.
Bura Jo Dekhan Main Chala, Bura Naa Milya Koye
Jo Munn Khoja Apnaa, To Mujhse Bura Naa Koye
Ya, you are right I am talking about XAMMP server; I know most of the guys are familiar with this tool. This post will help to some of people who do not know XAMMP and want readymade solution to quick start there development work (most of time collage students
).
XAMMP is the readymade tool contains open source language, database and apache in one place so you don’t need to worry about installation of packages , just install XAMMP and all things install and simonize automatically.
XAMMP comes for Linux, Window, Mac and Solaris
XAMPP for Linux
The distribution for Linux systems contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.
XAMPP for Windows
The distribution for Windows 2000, 2003, XP and Vista. This version contains: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql. XAMPP for
Mac OS X
The distribution for Mac OS X contains: Apache, MySQL, PHP & PEAR, SQLite, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, zlib, Ming, Webalizer, mod_perl. XAMPP for Solaris
The distribution for Solaris contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, Freetype2, libjpeg, libpng, zlib, expat, Ming, Webalizer, pdf class. The license
XAMPP is a compilation of free software (comparable to a Linux distribution), it’s free of charge and it’s free to copy under the terms of the GNU (General Public License). But it is only the compilation of XAMPP that is published under GPL. Please check every single license of the contained products to get an overview of what is, and what isn’t, allowed.Note
The new version of XAMPP 1.7.3 but i will recommend old version because it is more stable and tested by most of dev communityDownload from appropriate version according to OS XAMPP, for windows download from SourceForg
Start To Work
1. Download XAMPP Installer or Zip files
2. Click on installer and selects directory (C:\)
3. Click “Install” button
4. If you download Zip folder then unzip and clicks on file name “setup_xampp.bat”
5. It is Done
6. Now You can start XAMPP server by clicking “setup_xampp.bat” and provide choice 1 or
7. You can start directly clicking file name “xampp-control.exe” and one small window will open
8. Now Clicks “Start” button in front of the service which you want to start
9. For E.g. Start Apache and Start MySQL
10. Open IE/FF and type http://localhost
11. One webpage will open having address http://localhost/xampp/splash.php
12. Select any language and now XAMPP page is open and it is working fine
13. Now go to installation folder (e.g. C:\xampp\htdocs) and create folder and deploy your web project in that folder (e.g. “Prince”)
14. Now you can access your web project in web browser by typing url http://localhost/Prince/
Step by step guide to configure “Ant” on window machine.
Posted by: Prince in Solutions No Comments »1. Install JDK
2. Download Ant Zip file.
3. UnZip in any folder (e.g. C:\Program Files\Ant)
4. Right click on My Computer
5. Click on Properties
6. Click on “Advanced” Tab
7. Click on “Environmental Variables”
8. Click on “New” button in “User Variables” section
9. Insert Variable name = “ANT_HOME” and Variable Value = “C:\Program Files\Ant” and Save
10. In “User Variables” section, Select “Path” from the list and click on “Edit” button.
11. And insert “;%ANT_HOME%\bin;” at last in the path and Save
12. Click on “New” button in “User Variables” section
13. Insert Variable name = ANT_OPTS and Variable Value = -Xmx1024m and Save
Note: steps 12 and 13 are Options Steps and it is used to avoid “Out of memory exception” because some tasks may require more memory.
Check Ant Installation is done properly or not?
1. Open dos/command prompt by typing “Cmd” in run text menu
2. Type “Ant –version” user will get information of ant version as below:
C:\Documents and Settings\Prince>ant -version
Apache Ant version 1.7.1 compiled on June 27 2008