You are currently browsing the archives for the java category.

TestNG at GTAC

The great video about TestNG.

The small java puzzle

Given the following code, what will be the outcome?
import java.util.Set;
import java.util.TreeSet;

public class A {
    public static void main(String[] args) {
      Set sets = new TreeSet();
      sets.add("1");
      sets.add("3");
      sets.add(new Integer(2));
      System.out.println(sets.isEmpty());
    }
}

JUG Ukraine: Building Java Applications using EJB 3.0 and JPA

Сегодня прошла очередная встреча JUG Ukraine. Лично для меня, это было знаковое событие, так как я, наконец-то, выбрался на встречу в Киеве, что докладчик был Mike Keith из Oracle, и что тема была достаточно интересная. Теперь о встрече.
Как было описано на форуме JUG Ukraine, регистрация была очень прозрачной :). Необходимо было заполнить бейдж, указав компанию, [...]

Plugins for Eclipse

Наверно любой, кто начинал использовать Eclipse после IntelliJ Idea, ощущал некоторое неудобство в первые месяцы работы в новой IDE. Проблем было много — философия проекта, настройки, горячие клавиши Eclipse сильно отличается от подхода в Idea. Но время делает свое дело — я уже привык к ней и начал использовать различные плагины для java разработки, о [...]

Java cries

Today I found a wonderful source at one project class.
Object param = …;
 if (java.util.Date.class.getName().equals(param.getClass().getName())){
       ((java.util.Date)param).getTime();
       //some code here
 }
Of course, if you are well-known with java specification, this code just is
Object param = …;
  if (param instanceof java.util.Date){
        ((java.util.Date)param).getTime();
       //some code here
  }
Oh, I am not honest. [...]

System Tray in Java

Several days ago I talked with my friend about a problem with using system tray in java. He develops a desktop application and needs a crossplatform (Microsoft Windows, Mac OS X and Linux) solution for system tray. Of course, you could say: “What the problem? Just use java 6″. Yep, you are right but we [...]

Maven2 and Cobertura

Сегодня нашел для себя большую странность в отчете Cobertura через Maven2. Результаты плачевные какие-то:

Thinking in refactoring

Today I have read the article “10 Commandments for Java Developers“. I was confused when I read the third commandment. Author said that the code was more readable in second sample then in first one.