
Latest Posts
 How to Reverse Number?
 How to Prints Alphabets by Java Loops
 Frequently Asked Algorithms and Programs in Interviews
 How to Swap two Numbers with and with out temporary variable.
 How to exclude fields from JSON while parsing by GSON/GsonBuilder?
 How to do JSON pretty formatting and Null Serialization (GSON/GsonBuilder)
 How to convert Java object to / from JSON by (GSON)
 GSON Introduction
 Log4j2 JSON Configuration for Java Logging Severity Levels, Formatting and Appenders
 Log4j2 New Features,Compare with Log4j and other Logging Framework
Top Posts & Pages
 Integrate Filebeat, Kafka, Logstash, Elasticsearch and Kibana
 JAVA Encryption and Decryption of URL Parameter
 Logstash Input and Output to/from Kafka Example
 Filebeat, Kafka Output Configuration
 Zookeeper "java.net.BindException: Address already in use"
 Elasticsearch Interview Questions and Answers
 Elasticsearch "max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] "
 Sample filebeat.yml file for Prospectors ,Kafka Output and Logging Configuration
 Elasticsearch REST JAVA Client to get Index Details List
 JDBC, "Invalid argument value: java.io.NotSerializableException; nested exception is java.sql.SQLException"
Search Blogs
Category Archives: Java
How to Reverse Number?
How to Reverse Number Java Program? Continue reading
Posted in Java, Algorithm, Programming Test
Tagged Java Program, Reverse Number, Algorithms
Leave a comment
How to Prints Alphabets by Java Loops
How to Prints Alphabets by Java Loops Continue reading
Posted in Java, Algorithm, Data Structure, Programming Test
Tagged Prints Alphabets, Java Loops, for loop, while loop, do while
Leave a comment
Frequently Asked Algorithms and Programs in Interviews
Frequently Asked Algorithms and Programs in Interviews to test logic Continue reading
Posted in Algorithm, Data Structure, Java, Programming Test
7 Comments
How to Swap two Numbers with and with out temporary variable.
How to Swap two Numbers with and with out temporary variable. 1: swap Numbers with temporary variable 2: Swap Numbers without temporary variable by Addition and Subtraction 3: Swap Numbers without temporary variable by multiplication and division Continue reading
Log4j2 New Features,Compare with Log4j and other Logging Framework
Log4j2 New Features,Compare with Log4j and other Logging Framework benchmark for performance. Continue reading
Log4j2 Java Logging Example Tutorial – XML Configuration, Severity Levels, Formatting and Appenders
Log4j2 Java Logging Example Tutorial – XML Configuration, Severity Levels, Formatting and Appenders, Logging Performance idea Continue reading
Binary Search Java Program
Binary search, also known as halfinterval search,binary chop or logarithmic search.Binary search works on sorted arrays values. Binary search begins by comparing the middle element of the array with the target value. If the target value matches the middle element, its position in the array is returned. If the target value is less than or greater
than the middle element, the search continues in the lower or upper half of the array, respectively, eliminating the other half from consideration.If the search ends with the remaining half being empty, the target is not in the array. Continue reading
Posted in Algorithm, Complexity, Data Structure, Java, Search
Tagged Algorithm, Big O, Binary Search, Data Structure, Java Program, Time and Space Complexity
Factorial of a Number by Java Program
The Factorial of number is denoted by n! , is the product/multiplication of all positive integers less than or equal to n.
Where n is always a nonnegative number and The value of 0! is 1, according to the convention for an empty product.
Example :
0!=1=1
1!=1=1
5!=5 * 4 * 3 * 2 * 1=120
12!=12 * 11 * 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1=479001600 Continue reading
Posted in Algorithm, Java
Tagged BigInteger, Example, Factorial;, Java Code, loop, Positive Number, recursion
Armstrong Number JAVA Program
Armstrong number is a number which is equal to sum of digits raise to the power total number of digits in the number.
Example :
33+ 73 + 13 = 371
14 + 64 + 34 + 44=1634 Continue reading
Posted in Algorithm, Complexity, Example, Java
Tagged Armstrong Number, Java Code
Bubble Sort/ Sinking Sort Java Program
Bubble Sort also called Sinking Sort is a comparison sort algorithm where smaller or larger “bubble” elements move to top. Continue reading
Posted in Algorithm, Complexity, Java, Sort
Tagged Algorithm, Bubble Sort, Comparison Sort, Complexity, Sinking Sort