Compiling the Program

To compile the Example program, execute the compiler, javac, specifying the name of the source file on the command line, as shown here: C:\>javac Example.java The javac compiler creates a file called Example.class that contains the bytecode version of the program. As discussed earlier, the Java bytecode is the intermediate representation of your program that … Read more

Object-Oriented Programming

Object-oriented programming (OOP) is at the core of Java. In fact, all Java programs are to at least some extent object-oriented. OOP is so integral to Java that it is best to understand its basic principles before you begin writing even simple Java programs. Therefore, this topic begins with a discussion of the theoretical aspects … Read more

Firewalls

Firewalls A machine connected to the Internet that isn’t behind a firewall is a disaster waiting to happen. And you won’t have to wait long. A recent study by the Internet Storm Center has shown that unpatched Windows computers only lasted 20 minutes before they were infected by some malware. If you’re running Linux, you’re … Read more

How to Hack an ADSL Router

Almost left half of the Internet users across the globe use ADSL routers/modems to connect to the Internet. However, most of them are unaware of the fact that it has a serious vulnerability in it which can easily be exploited by anyone with a basic knowledge of computer. In this post, I will show you how to hack an Ethernet … Read more

Two Dimensional Array

Two dimensional arrays are also called table or matrix, two dimensional arrays have two subscripts Two dimensional array in which elements are stored column by column is called as column major matrix Two dimensional array in which elements are stored row by row is called as row major matrix First subscript denotes number of rows … Read more

One Dimensional Array

Simplest data structure that makes use of computed address to locate its elements is the one-dimensional array or vector;number of memory locations is sequentially allocated to the vector. A vector size is fixed and therefore requires a fixed number of memory locations. Vector A with subscript lower bound of “one” is represented as below L0is … Read more

Case Analysis in Data Structure

Worst Case Analysis In the worst case analysis, we calculate upper bound on running time of an algorithm. We must know the case that causes maximum number of operations to be executed. For Linear Search, the worst case happens when the element to be searched is not present in the array. When x is not … Read more

Time and space analysis of algorithms

Algorithm An essential aspect to data structures is algorithms. Data structures are implemented using algorithms. An algorithm is a procedure that you can write as a C function or program, or any other language. An algorithm states explicitly how the data will be manipulated. Algorithm Efficiency Some algorithms are more efficient than others. We would … Read more

Operation on Data Structures

Design of efficient data structure must take operations to be performed on the data structures into account. The most commonly used operations on data structure are broadly categorized into following types, Create The create operation results in reserving memory for program elements. This can be done by declaration statement. Creation of data structure may take … Read more