Java

Java Final in C#

Tuesday, July 22nd, 2008

Final keywod for a java class, in c# is replaced by sealed keyword, which means that the class is not available for inheritance. For variables final in java is the same as readonly in c#: values cannot be modified after initialization, however, they are stored as values. const in c# is ...

Java - Convert Text to UTF-8 or Unicode

Wednesday, April 2nd, 2008

Converting text to UTF-8 and unicode in Java is very easy, you can use the following block of code: try { // Converting from Unicode to UTF-8 String string = "abc\u5639\u563b"; ...

Process XML Documents in Java using XPath and XSLT

Thursday, March 13th, 2008

The Extensible Markup Language (XML) is certainly one of the hottest technologies at the moment. While the concept of markup languages is not new, XML seems especially attractive to Java and Internet programmers. The Java API for XML Parsing (JAXP), having recently been defined through the Java Community Process, promises ...

Accessing MS Access Database with Java

Wednesday, January 23rd, 2008

1. Create a DNS name for your Access Database(*.mdb file) which you want to connect. Start -> Settings -> Control Panel -> Data sources Select Access in User Data Source Click Create Select ...

Design Patterns - Builder

Tuesday, August 28th, 2007

The Builder Pattern is a software design pattern. The purpose of using it is creating different represenatations from the same construction. It is accomplished by separating the construction of a complex object from its representation. Often, Builder Pattern is used to build Composite pattern, a structure pattern. STRUCTURE JAVA EXAMPLE /** "Product" */ ...