Blog Archives

Sudoku Checker and Solver

Sudoku is a puzzle where we need to fill a 9×9 grid with digits from 1 to 9 such that each column, each row, and each of the nine 3×3 blocks contains all of the 1-9 digits. Sudoku Checker The

Tagged with: , , , , ,
Posted in Java

Inheritance in Java

The following are different relationships between classes. Let A and B be two classes. Dependency: A uses B Aggregation: A has-a B (as an attribute) Inheritance: B is a kind of A Subclass and Superclass In Java, new classes (child

Tagged with: , , , , , ,
Posted in Java

Writing Classes in Java

There are two meanings of “class”. A class could be: a code library (a collection of methods). For example, java.lang.Math contains methods for performing basic numeric operations. an object data type (a description of a concept). For example, java.lang.String represents

Tagged with: , , , ,
Posted in Java

Debugging in Java

A software bug is a mistake in a program. Debugging is to find and correct the mistakes (introduced by yourself). Programmers usually spend 20% of time for coding, and 80% of time for debugging. In 1996, the European Space Agency’s

Tagged with: ,
Posted in Java