Thursday, September 21, 2023
How to Count number of Set bits or 1's of Integer in Java? Example
How to Add Two Integer Numbers without using Plus + or ++ Arithmetic Operator in Java - Recursion example
How to Check if Integer Number is Power of Two in Java - 3 examples
How to choose a Collection class in Java? Flowchart Example
Wednesday, September 20, 2023
How to Check If Number is Even or Odd without using Modulus or Remainder Operator? Example
Java Program to print Prime numbers in Java - Example Tutorial and Code
Java Program to Find Sum of Digits in a Number using Recursion? Example
Difference between @RunWith vs @ExtendWith Annotations in JUnit - Java Unit Testing Example
Hello guys, if you have written any unit test in Java then you must have come across JUnit and Mockito. JUnit is the most popular and widely-used testing framework in the Java ecosystem, enabling developers to write and execute unit tests for their Java applications. While writing tests, JUnit provides various annotations to facilitate different functionalities. Two of these annotations, @RunWith and @ExtendWith, play a crucial role in customizing the test execution process. In this article, we will explore the key differences between these two annotations and illustrate their usage through a Java program. This one is also one of the popular JUnit Interview question which I have also included in my earlier article about 20 Most asked JUnit Interview Questions for Java developers, if you haven't read it yet then you can also read it to learn more about JUnit and unit testing in Java.
Java Program to Reverse an Integer Number - Example tutorial
How to Count Number of Words in String ? Java Coding Exercise Example
How to Reverse String in Java Using Iteration and Recursion - Example
Top 20 String Algorithm Questions from Coding Interviews
Tuesday, September 19, 2023
How to check if two String are Anagram in Java - Program Example
How to delete a directory with files in Java - Example
How to resolve java.lang.ClassNotFoundException in Java? Example
ClassNotFoundException is one of Java nightmare every Java developer face in there day to day life. java.lang.NoClassDefFoundError and java.lang.ClassNotFoundException are two errors which occurs by and now and chew up of your precious time while finding and fixing root cause. From the name java.lang.ClassNotFoundException looks quite simple but underlying cause of it is always different and which classifies it as an environmental issue. In this java tutorial, we will see what is ClassNotFoundException in java, what is real cause of it, and how to fix it along with some more frequent and infamous examples of java.lang.ClassNotFoundException in Java or J2EE, Don’t mistake this exception with NoClassDefFoundError in Java which is also due to incorrect classpath in Java.