Using Scanner for reading data from system console in Java

Java has one more way for reading data from system console. Scanner was introduced in Java 1.5.

. . . →Read More:Using Scanner for reading data from system console in Java

Share

Reading data from console with Console class in Java

Java 6 allows to read data from system console with Console class. There are several ways to do it,but I personally like this one.

. . . →Read More:Reading data from console with Console class in Java

Share

Redirecting System.out,System.in,System.err in Java

Sometimes need to redirect System.out,System.in,System.err. It is very easy. I am going to show here how you can do it.

. . . →Read More:Redirecting System.out,System.in,System.err in Java

Share

Converting array to list and list to array in Java

I don’t understand why I can’t keep in mind these simple methods. Last months I used them very often,these methods are very useful.Today I had simple task and I searched in the internet these methods because I couldn’t recollect them. I am going to show simple example where I will use these methods. After . . . →Read More:Converting array to list and list to array in Java

Share

Comparing Date/Time in Java

I found some problem when I tried to compare date/time in Java. Yes,I know that need to use compareTo(Calendar anotherCalendar) method. But problem I found in initialization side. I spent some time and found the solution. I initialize Calendar object with method getInstance(),it is correct way,but this method initialize date till millisecond. Here . . . →Read More:Comparing Date/Time in Java

Share

Renaming file or directory in Java

I am going to show example which shows how to rename file or directory in Java.

. . . →Read More:Renaming file or directory in Java

Share

Moving file or directory to other directory in Java

In Wallpaper Changer application version 1.2.* we added feature which allows to move file in application’s file manager.

I want to show how we did it. As you see this post refer to core Java not Android. That’s why I will post code with method main.

. . . →Read More:Moving file or directory to other directory in Java

Share

Scheduling a timer task to run repeatedly in Java

In Java is very easy to use timer for scheduling some job. There are a lot of other libs which you can use for scheduling,but Java has own approach for simple job schedulling.

. . . →Read More:Scheduling a timer task to run repeatedly in Java

Share

Using FileFilter in Java

What need to do when you want to filter files by extensions in directory?

There are 2 ways:

implement FileFilter or FilenameFilter.

I am going to show how to do this with FileFilter.

. . . →Read More:Using FileFilter in Java

Share

Sorting directories and files in Java

Several days ago we modified looks of our file manager in Wallpaper Changer application. In first version we used simple sort without Comparator or Comparable interfaces.

. . . →Read More:Sorting directories and files in Java

Share

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna,tincidunt vitae molestie nec,molestie at mi. Nulla nulla lorem,suscipit in posuere in,interdum non magna.