Import static elements for more readable Java code

4 Comments

One of the welcome additions to Java language in Java 5 release is the static import declaration. static import works in the same way as traditional import declaration but it imports only the static members of a class.
Traditional import declaration looks like this
import java.util.*;
The above statement will import all the classes under java.util package.

The format of static import declaration is similar with the addition of keyword static. E.g;

import static java.lang.Math.*;

This statement will import all the static members of java.lang.Math class.

Similar to import declaration the static import offers two options. You can import all static members of a class or import only the members that you need in your program.

import static java.lang.Math.PI;
will import only PI.
import static java.lang.Math.*;
will import all static elements from Math class.
More

article clipper vert Import static elements for more readable Java code
 

Top 10 tools for bloggers.

3 Comments

If you are looking for ways to improve your blogging you can start by using some of tools mentioned at Lifehacker.
Mosts of the tools on this list are Firefox extensions, but the list also have few stand alone applications that may help you in your blogging. My favorite tool on that list is Foxmarks that helps you keep your post ideas synchronized.
Do you any of these tools or have your own favorite tools? Share them with your fellow bloggers in the comment section below.

article clipper vert Top 10 tools for bloggers.
 

Test your Java skills.

7 Comments

Even with many years of experience with programming in Java one cannot claim that he or she has mastered the language. What I found out with experience is that unless your job offers you diverse problems to solve, you are more likely to work on similar projects and hence may end up using the exact features of the language. And this leads to being forgetful about the minute and basic aspects of the language. To stay up-to-date with the latest developments in any area it is vital that you regularly read relevant magazines, books, and/or subscribe to the blogs. It is also important that you test your knowledge of the subject by taking quizzes once in a while. A good quiz will make you think about the subject broadly and will also point out your weak points. This will not only help you think about what you have learned over the years but it will also tell you the aspects of the subject that you need to improve on. For Java developers who would like to check their knowledge of their beloved programming language More

article clipper vert Test your Java skills.
 

Homer Simpson in pure CSS.

No Comments

OK developers here is your next software project. Create a web page that will display Homer Simpson’s image on the screen. Too easy for you? Here is the catch. You cannot use any image. Yes that is correct you will need to draw Simpson’s image without using any graphics. Sounds impossible? If  you think this cannot be done  check out what Roman Cortes did with just the CSS.

CSS Simpson

Isn’t that amazing. It is awesome how some developers can use their skills to achieve what many might consider impossible.

Now do you think you can deliver the project in two weeks?  icon smile Homer Simpson in pure CSS.

The moral here is that for software developers there is nothing impossible. Where there’s a will there’s a way. Always maintain the ‘Can do’ attitude.

article clipper vert Homer Simpson in pure CSS.