This document contains 6 examples of Java code snippets or concepts: 1) Calculating the value of an algebraic expression. 2) Extracting a substring from a string. 3) Getting the length of a substring. 4) Calculating percentages of different amounts. 5) Finding the day of the week for a given number of days in the future. 6) Calculating factorials of numbers recursively.