Java method overloading

In this example we cab see how use method overloading in Java, multiple methods can have the same name in the same class with different parameters. This is possible because methods in Java are distinguished by their method signature. The method signature is the combination of the method name and the parameter list. In Java … Read more

Java introduction int type

One of the Java primitive types is int (integer, whole number) type. You can use it to create variables which can contain positive and negative whole numbers. The range of the int values are from -2147483648 until 2147483647. Example program with some common operations with int: Output:

Java introduction to boolean

One of the primitive data types in Java is boolean. You can create boolean with boolean keyword. This type of variables can only contain true or false as values. This data types are very useful when used with if, while statement which are (decision-making statement with boolean conditions) or when we need to use logical … Read more

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