Java technologies (translated java-related articles)
June
2006
Oracle DBMS Metadata (DDL)
Posted in: Java technologies (translated), Базы данных, SQL, Oracle | 2 Comments
The Russian version of this article can be found here.
All SQL statements are devided into two main categories:
DDL - data definition language;
DML - data manipulation languauge.
DML is used to change the data in the database tables. Instructions of DML are well-known for everyone: insert, update, delete. In order to save changes to database (so, the other users will see them), you need to execute commit operator. To discard all of your changes you have to execute rollback operator.
All database objects (triggers, tables, indices, etc.) have their definitions. DDL-expressions (metadata) of these objects can be extracted from the database schema. DDL-expressions will help you during database analysis and optimization.
This article will teach you, how objects’ definitions can be extracted from the Oracle database instance.
(more…)
April
2006
JUnit and Test Cases (Unit Testing)
Posted in: Java technologies (translated), Тестирование кода | No Comments
The Russian version of this article can be found here.
Testing is not a very interesting thing sometimes. Some developers use standard output or debugger in order to test their classes. But there is another way… In this article you’ll find the introduction into JUnit library. JUnit framework makes the process of test-writing much easier.
To show you the power of JUnit let me create the small class in Java and write some test cases for it. Consider the following code:
(more…)
April
2006
Anonymous inner classes in Java
Posted in: Java technologies (translated), Java technologies, J2SE | No Comments
The Russian version of this article can be found here.
There are a lot of articles through Internet which have mistakes regarding anonymous inner classes in Java. Anonymous inner class:
- has no name;
- can’t be declared as static;
- can be instantiated only once.
Let me show you the truth.
Consider the following code:
(more…)
February
2006
Singleton Design Pattern in Java
Posted in: Java technologies (translated), Паттерны проектирования | 4 Comments
The Russian version of this article can be found here.
Design patterns are descriptions of problems and possible ways of their solving during object-oriented design (OOD).
Maybe the most popular design pattern is Singleton Pattern. It is used to guarantee that there will be only one instance of particular object in the application. The realization of this pattern can be useful while creating Connection Pool, Factory, Configuration Manager, etc.
In this article you will find basic description of this pattern and the example of its practical usage (in Java).
Look through the following code:
(more…)