The Comparable interface
The Comparable interface is defined in the java.lang package and it contains only one
method, compareTo, which takes an object as a parameter and returns an integer. Any class
that implements the Comparable interface needs to defi
A wrapper class represents a particular primitive data type.
(primitive data types int, double, char, boolean, and so on)
They are defined in the java.lang package.
Instead of declaring an integer as primitive data as:
int number1 = 45;
An algorithm is a sequence of computational steps that transform some input into some output.
It is a tool for solving a well-defined computational problem.
Examples of such problems - searching, sorting
Linear Search Algorithm
The Java programming language was
created by Sun Microsystems, Inc.
It was introduced in 1995 and it's
popularity has grown quickly since
It is an object-oriented language
Java Program Structure
In the Java programming language:
Reading/Writing Text Files
Reading Text Files:
Instead of reading from the standard input,
we can read from text files using the classes
FileReader and BufferedReader.
public class ReadingFromFile
public static void main (String a