Skip to content
April 2, 2012

How to use find command in Unix for finding files and directory with Example

Find command in Unix or linux is fantastic and wonderful tool a developer can have. find command is so versatile that you can find any file, directory or symlink using it. This video contains Some examples of find command in unix for day by day usage related to searching file based upon timestamp, size and various other parameter including regular expression.  Some of example of find command in linux and unix is bit old but they are still effective.

 

http://www.metacafe.com/fplayer/8311110/Finding_files_using_find_command_in_Unix_and_Linux_with_Example.swf<br /><font size=”1″>Finding files using find command in Unix and Linux with ExampleThe best home videos are here</font>

March 30, 2012

Different example to parse XML file in Java – DOM , SAX and JDOM parser

Reading file in Java is very easy because Java provides good support for xml file reading with lots of XML parsers including popular DOM parser and SAX Parser in Java. You can read xml file by using either SAX(Simple API for XML) parser or DOM (Document Object model) parser in Java.

SAX and DOM parsers are two very popular XML Parse used to read XML files in Java but there is difference how they parse xml file and without knowling there limitation if you parse large xml files you can get several errors.see Difference between SAX and DOM parsers and guides when to use DOM parser and when to use SAX parser in java.

Check out this article if you are looking to read xml file using DOM parser or check this article which contains step by step example with full java code for reading xml file in Java using SAX parser and advantage of SAX parser over DOM parser.

Even properties file can also be represented using xml format but Java has special API for reading XML properties file.

 

March 30, 2012

Different example to parse XML file in Java – DOM , SAX and JDOM parser

Reading file in Java is very easy because Java provides good support for xml file reading with lots of XML parsers including popular DOM parser and SAX Parser in Java. You can read xml file by using either SAX(Simple API for XML) parser or DOM (Document Object model) parser in Java.

SAX and DOM parsers are two very popular XML Parse used to read XML files in Java but there is difference how they parse xml file and without knowling there limitation if you parse large xml files you can get several errors.see Difference between SAX and DOM parsers and guides when to use DOM parser and when to use SAX parser in java.

Check out this article if you are looking to read xml file using DOM parser or check this article which contains step by step example with full java code for reading xml file in Java using SAX parser and advantage of SAX parser over DOM parser.

Even properties file can also be represented using xml format but Java has special API for reading XML properties file.

 

March 26, 2012

When to use Checked and Unchecked Exception in Java

Checked and unchecked Exception are two different types of Exception in java. both are similar in functionality and you can do all things with checked exception which are possible with unchecked exception. though there are some subtle differences like for unchecked exception you don’t
need to add explicit try catch block which pollute code in case of checked Exception.

Key point is how do you decide whether business Exception should be checked or unchecked.like here InsufficientFundsException can be both, share your thought on that, my go is if you have an alternative when an operation failed or chances of failing an operation is more than consider declaring it as checked Exception.

Both throw and throws can be used in conjuction with checked and unchecked Exception

 

read ful article at: http://javarevisited.blogspot.com/2011/12/checked-vs-unchecked-exception-in-java.html

March 19, 2012

Observer Pattern in Java with sample code example

Observer pattern in Java is one of most used core Java pattern which has heavily used in JDK and outside of Java development kit in various frameworks like Spring,Struts and other Apache libraries. Observer pattern allows a publisher subscriber mechanism on which Subject notifies all interested subscriber for any change in object’s state. Java has builtin support for observer pattern by java.util.Observable and java.util.Observer classes.

read full article at http://javarevisited.blogspot.com/2011/12/observer-design-pattern-java-example.html

 

Follow

Get every new post delivered to your Inbox.