Usage of Ciel and Floor in Java

Java Math package provides the ciel(double d)  and floor(double d) functions. The ciel function is used to get the smallest integer that is not less than the input. Obviously this means the ciel will round it to the next higher non decimal number. For example… Read More

How to concatenate String in Java

In java we can concatenate string using the concat method of the java.lang.String class. Concat method appends the input string to the current string and returns the combined string.

Above code concatenates two strings – merges into a single string. This is not efficient… Read More

How to Split or Tokenize a string in Java

The java.util.StringTokenizer can be used to split a string into individual tokens. As this class is deprecated now, it is better to use the split method of java.lang.String. Methods String[] split(String regex) – Splits the string according to the regular expression   Example

 … Read More

Java Static Keyword Example

In Java, the static keyword can be applied to four programming artifacts They are Static Variable When many instances of a class are created, each instance will have its own copies of instance variables. That means number of objects created from the same blue print (… Read More

Apache HttpClient – Tutorial And Best practices

Overview of Apache HttpClient   HttpClient makes programmatic HTTP protocol interactions easier. It is a standards based Java implementation of Http protocols version 1.0 and 1.1. Provides complete implementation of HTTP methods – GET, POST, DELETE, PUT, HEAD, OPTIONS, TRACE). Features wise it is exhaustive.… Read More