Useful Java Utility Classes

Java  is a good language for web development. It’s mature and most big companies use java.  Here we will see the list of Java Utility Classes which are useful in your java development.

Java Utils Package

1.Arrays

2.Collections

 Apache Classes

Apache provides lots of useful classes those are helpful in fast java development.When you are fixing sonar violations following classes will helpful for you.

1. StringUtils –    Apache also provides some classes which will be most useful in String operations.For example

  • IsEmpty/IsBlank – checks if a String contains text.
  • ContainsOnly/ContainsNone/ContainsAny – does String contains only/none/any of these characters

2.CollectionUtils – This class is most useful in collection related implementations.Provides utility methods and decorators for Collection instances. For example

isEmpty(java.util.Collection  coll)
Null-safe check if the specified collection is empty.

Use following maven pom entry to download the jar for above classes.

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>

<dependency>

<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.0</version>
</dependency>

Spring Framework Utility Classes

Spring also provides some utility classes like below

StringUtils

All the above both classes have lots of static methods which will be reduce your implementation time.

 

 

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·