This tutorial will introduce you to mouse events in Java. You will learn how to program a cursor tracker, which triggers on events such as mouse button pressed, released, clicked, dragged, moved, etc.
Learn how to sort an array efficiently using the sort() method and a custom Comparator in Java.
Find the first 1000 twin prime numbers in Java using an isPrime function for the primality check and a value comparison between the prime numbers.
Java example of how to validate a phone number in various formats using regular expressions. Contextual Ads More Java Resources Advertisement
A simple modulus based algorithm used in Java to find if the passed number is prime or not.
The Euclidian algorithm is being used in a Java function for finding the greatest common divisor. The simple function calls itself (recursion) until the greatest common divisor has been reached, at which point it is returned.
Demonstrates how to encrypt a string using the MD5 algorithm in Java. Since MD5 is non-reversable, there is no code for decrypting the value.
A fully functional Minesweeper game in Java that is similar to the one bundled with Windows, and that can be easily enhanced.
Use Java, physics and simple math to calculate the position of a projectile at a given time and its velocity.
Use the Java Socket object and the BufferedReader to retrieve the response of an HTTP web request.