Category Archives: Java

Top 5 Java Forums Worth Frequent Visits for Newbie Java Developers

java forums

If you are a newbie Java developer, and want to get your queries clarified quickly along with learning Java in a fast-paced manner, you may plan to visit to some of the following forums on the regular/frequent basis. These forums have been reviewed and listed below on the basis of number of discussion threads and participation/replies from the forum members. These forums could also be frequented by experienced Java developers owing to the fact that various interesting topics related to advanced level Java are also discussed in these forums. [adsenseyu2] CodeRanch.com (http://www.coderanch.com/forums): A very active forum, for Java developers of all expertise level, I personally found this best of the …

Continue reading

Posted in Freshers, Java. Tagged with , .

Tools to Obfuscate Your Java Classes

If you have got the requirement to demonstrate your tool built using Java on client machine (third party computers) by deploying your entire tool, and you are worried if your critical application jar files consisting of Java classes could get decompiled and seen by others, you could use some of the following tools: Proguard could be used to obfuscate the class files. ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. In the process of obfuscation, it renames the remaining classes, fields, and methods using short meaningless names.  JBCO (Java ByteCode Obfuscator) could transform code to be more complex, esoteric, or otherwise obscure in order to hinder reverse-engineering nad decompilation …

Continue reading

Posted in Java. Tagged with .

Switch Statement with String in Java 7

Following code represents one of the requirements in which you could use Switch statement to work with String in Java. This should be noted that this feature got newly introduced in Java 7. Below is the class CalendarUtil which has a method namely numberOfDays to calculate number of days in a month of a given year. Note the logic for february month which will vary based on leap year logic. Rest of the days count remain same in different months irrespective of years. public class CalendarUtil { public static int numberOfDays(int year, String month) { int numberOfDays = -1; switch (month) { case “january”: numberOfDays = 31; break; case “february”: …

Continue reading

Posted in Java. Tagged with .

Tips to Migrate from Traditional to Spring MVC based Java Web Application

migrate

This article talks about what would it take to move the non-spring Java application to Spring-based Java application. This essentially means that if you have a traditional Java web application with object instantiation taking place in independent class files or based on Factory pattern, this article would help you to move to a Spring based component model. Moving to Spring-based component model would essentially mean that one would move the object instantiation to one of the spring configuration file and that the component instantiation would happen based on dependency inversion principle. Before moving on to the steps, it would be good to learn Spring framework concepts and also Spring MVC …

Continue reading

Posted in Java. Tagged with .