How to compare Strings in Java?

Problem There are many ways how to compare strings in Java and most of them are different. Here we will cover these cases: Using .equals() method; Using .compareTo() method; Using == operator. Solution Let’s check what we can compare using .equals() / .equalsIgnoreCase() methods. If you are newbie

How to reset Windows 10?

Problem Why do you need to reset Windows 10? Sometimes your computer becomes very slow, because you have many unused applications installed and store a lot of unused stuff in your hard disk. Some people like to flush everything and start using Windows from

How to read UTF8 file with BOM?

Wikipedia about UTF8 BOM The byte order mark (BOM) is a Unicode character, U+FEFF byte order mark (BOM), whose appearance as a magic number at the start of a text stream can signal several things to a program consuming the text:[1] What byte order, or

How to read a file in Java?

There are many ways to read a file in Java. The simplest and most common used method is using BufferedReader class. First of all, let’s create a file and name it as “example.txt” with some dummy text: Lorem ipsum dolor sit amet, consectetur adipiscing