Category Archives: Java

How to Reverse Number?


How to Reverse Number Java Program? Continue reading

Posted in Java, Algorithm, Programming Test | Tagged , , | 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 , , , , | 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

Posted in Algorithm, Data Structure, Java, Programming Test, Uncategorized | Tagged , , , , , | 1 Comment

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

Posted in Java, Java Logging, LOG4J2 | Tagged , , , , , , ,

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

Posted in Java, Java Logging, LOG4J2 | Tagged , , , , , , , , , , , , , , | 2 Comments

Binary Search Java Program


Binary search, also known as half-interval 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 , , , , ,

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 non-negative 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 , , , , , ,

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 ,

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 , , , ,