Java read all files in folder and write only unique rows

This program read all files in a folder then it will filter out all rows smaller then 10 symbols and it will save then in one file Program’s steps: Test files which should be in one folder. This files contains names which can be duplicated: Output file result from this two input files. Contain only … Read more

Java Quadratic equation solution

In algebra, a quadratic equation (from Latin quadratus ‘square‘) is any equation that can be rearranged in standard form as: ax2 + bx + c = 0 This java program will try to find the roots of this quadratic equation based on the parameters a, b and c. This parameters are required to be given as input from the console and then … Read more

Java 17 do-while loop of user input with switch statement

In this program, you can see Java 17 multi-string (inputMessage) creating BufferedReader to read the user input (System.in). The user input inside the do-while loop will be checked and repeated until the user writes exit. For every input 1, 2, or 3 there is an specific output, but for other user inputs we get the … Read more

Java read input from console

To capture input from console in Java program you have several options. Two of the most commons ones are to use Scanner (java.util.Scanner) or BufferedReader (java.io.BufferedReader). Both of them are using System.in (standard input stream) to capture the keyboard input. ⚠ One thing to consider is that both classes Scanner and BufferedReader implement Closeable (java.io.Closeable). … Read more