12/29/11

The final keyword in Java

Like other keywords in java, final is also a keyword used in several different contexts to define an entity which cannot later be changed. Here in this tutorial we will be dealing with final classes, final methods, final variables and also I will be covering blank final variabl...

12/16/11

Java Graphics Tutorial II - Layouts

In the previous tutorial of Java Graphics, I explained about panels, frames and windows which we can put our items. But we didn't set the layout of the window , panel or frame in our last tutorial, what we did was we used the default layout.Today in this tutorial we will be understanding about the...

12/13/11

Python Tutorials : Data Types - NUMBERS

This Post is about numbers and mathematical operations. In this tutorial we shall be covering data types, operators and type conversion. To represent 'Numbers' in python, we have int, float, complex datatypes. For conditional statements, we have 'Bool' datatype Type ipython on the Terminal...

12/10/11

12/3/11

Java Array tutorial with Examples

After seeing many people having doubt about using arrays (in Java) and how they are stored, when are they created etc. i decide to do a post on Arrays in Java, to give my readers a broader and clear view about Arrays declaration, creation and intialization. Definition, Arrays are complex variablesthat...

11/26/11

Java Problem Set 2

Write a function which calculates the sum of even Fibonacci numbers. public static void main(String args[]) { for(int i=1;i<22;i++) System.out.print(sumofEvenFibonacci(i) + " "); } public static long sumofEvenFibonacci(int n) { // add your code here. return sum; } prints 0...

11/22/11

Code 2 Learn One year completion

Today Code 2 Learn Completed one year.. And in this 1 year, it has seen some incredible ups, here are stats :Code 2 Learn Website : Pageviews : 67,5000Code 2 Learn Alexa :India Ranking : 51,000 ( 900,000 )World Ranking : 931,772 (initially : 5,000,000)Code 2 Learn Facebook Page : 400+ fans.....

11/19/11

Java Graphics Tutorial - 1

As we all know that we can make games with the help of java libraries that provide us with the graphics needed for making them. So today I will be starting a very new section on Java Graphics. I had earlier made posts on How to make an income tax calculator. To start with here are some prerequisites...

11/18/11

Java Certification (O1Z0-851) : uCertify

In today's world if you are an IT professional so you are bound to have certain certification to increase your value in the IT industry. So today I am going to review an uCertify Certification course for Java (O1Z0-851).  Before we proceed lets have an idea about uCertify. uCertify is one...

11/16/11

11/14/11

Static Keyword in Java

While you are programming you would want to use some class members independently of any object of that class. Normally a class member is accessed with the help of the object of that class. However, it is possible to create class members that can be used by itself. To create such a member,...

Multilingual SEO

Search Engine Optimization is very crucial for the success of any online business. With the help of SEO, you can get your website optimized in such a way that you receive good traffic inflow from...

11/12/11

H1 Tags in SEO

H1 tags are one of the most important part of SEO which is the header tag situated in body of a website. It can be termed as the most simple form of header found on a web page. Through h1 tags search...

Problem Set 3

The below questions are very interesting and amazing questions. So please do try it. QUESTION 1 int a=5,*b=&a;printf("%d",a**b);...

11/11/11

Methods Explanation : Java Tutorial

A Java method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println method, for example, the system actually executes several statements in order to display a message on the console. Now you will learn how to create your own methods...

11/10/11

Problem Set Java

 Predict the Output    Question 1 class Base { public void Print() { System.out.println("Base"); } } class Derived extends Base { public void Print() { System.out.println("Derived"); } } class Main{ public static void DoPrint( Base o ) { ...

11/8/11

Problem No.1

The below program is hideously slow. CAN YOU SPOT THE REASON? public static void main(String args[]){ Long sum=0L; for ( long i=0; i < Integer.MAX_VALUE; i++){ sum += i; } System.out.println(sum); } ...

11/4/11

Reading and Writing File in Java

Java like other programming languages supports both reading and writing of files. For reading purpose we use FileReader and for writing we use FileWriter. FileReader Class : The FileReader class creates a Reader that you can use to read the contents of a file. Its two most commonly used constructors...

11/3/11

Good Practices : Programming Tips Java

One of the Good practices while programming using Java is listed below. Consider Static Factory Methods instead of Constructors The normal way for a client to obtain an instance of itself is to provide a public constructor. But apart from this their is another technique which should be the...

Java Tutorial : What is a Class?

Java class is nothing but a template for object you are going to create or it’s a blue print by using this we create an object. In simple word we can say it’s a specification or a pattern which we define and every object we define will follow that pattern. What does Java Class consist of : When...

10/31/11

OOPs Concept : Polymorphism

Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. Any java object that can pass more than on IS-A test is considered to be polymorphic. In Java, all java objects...

10/23/11

OOPs Concept : Inheritance

After discussing Encapsulation, now its time for 'Inheritance' as OOP Concept. Inheritance can be defined as the process where one object acquires the properties of another. With the use of inheritance the information is made manageable in a hierarchical order. When we talk about inheritance the...

10/12/11

Conditions of Parallelism : Data Dependence

In Parallel or Sequential Execution of programs there are some concepts of dependence that we need to understand. These dependencies are known as Data,Control and Resource Dependence. Here I will be focusing on Data dependence. Data Dependence : It can be explained as the ordering relationship...

10/9/11

Object Oriented Programming (OOP) Explanation

Object-oriented programming (OOP) is a programming paradigm that uses "objects" to design applications and computer programs. It utilizes several techniques from previously established paradigms, including inheritance, modularity, polymorphism, and encapsulation. Today, many popular programming...

10/6/11

10/1/11

9/29/11

How to avoid multiple lines in TD tag?

In some situation (viewing in different browsers) the single <td> tag displays content in two lines. If you want to display sentence in single line always in all browsers then use <td> attributes ‘nowrap’For example,you may want username/userid/Name to be displayed in single line,...

9/24/11

9/17/11

9/12/11

OOPs Concept: Encapsulation

Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance, polymorphism, and abstraction. RFAZHE7YNFV8 Encapsulation is the technique of making the fields in a class private and providing access to the fields via public methods. If a field is declared private,...

9/7/11

Java Modifiers Summary

The Modifier class provides static methods and constants to decode class and member access modifiers. The sets of modifiers are represented as integers with distinct bit positions representing different modifiers. RFAZHE7YNFV...

9/1/11

SortableStack implementation in Java

I am implementing an interface for Stack which will help to push and pop in O(n) time and help in finding the highest, lowest and the middle element in O(1) time. I will be using Arraylist (since I m using a standard jdk 6 and not some other package) because with using this we can implement...

8/12/11

Create Linked List using Java

The LinkedList class extends AbstractSequentialList and implements the List interface. It provides a linked-list data structure. It has the two constructors, shown here: RFAZHE7YNFV8 LinkedList( ) LinkedList(Collection c) The first constructor builds an empty...

Create Linked List using C

Introduction Linked list is one of the fundamental data structures, and can be used to implement other data structures. In alinked list there are different numbers of nodes....

7/22/11

7/10/11

Java : Using JDBC API Tutorial

You need to use database drivers and the JDBC API while developing a Java application to retrive or store data in a database. The JDBC API classes and interfaces are available in the java.sql  and the javax.sql  packages. The commonly used classes and interfaces in the JDBC API are : DriverManager...

7/5/11

7/1/11

6/28/11

Java : Encryption and Decryption of Data using AES algorithm with example code

There are many problems when you try encrypting a string such password, credit card nos, phone no. etc ie 1. which algorithm to use. 2. how to store the generated Key in the database. 3. should i use MD5, AES etc. Here is the question to all your answers. After spending sometime on this i finally...

6/23/11

6/21/11

Java Servlet Basics

Servlet Basics Servlets are Java programs running on a web server that produce  results viewed remotely on a web server. Servlets has the same purpose that CGI or PHP had in the past.Here in this tutorial we are going to learn about servlet request and response model, its life cycle,...

6/8/11

5/23/11

Excel 2007 : Charts and Graphs tutorial

In Microsoft Excel, you can represent numbers in a chart. On the Insert tab, you can choose from a variety of chart types, including column, line, pie, bar, area, and scatter. The basic procedure for creating a chart is the same no matter what type of chart you choose. As you change your data,...

5/19/11

5/18/11

5/5/11

4/14/11

Income Tax Calculator

With many of people giving Income tax each year this application would be a cool application for them as this will calculate their Income Tax in just few seconds. Its a java application. What you need to do is just change the tax % every year and then import it using ECLIPSE IDE.. Eclipse IDE has...

4/4/11

3/6/11

Android Installation in Eclipse

Here is an Android App. that helps the user to change the ringing profile from SILENT to NORMAL and vice-versa in just a simple touch on the phone. No need to go to the setting and change the ringtone style over and over again when in office,college etc...

2/23/11

Symbol Table in Java

Symbol Table Definition : In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is associated with information relating to its declaration or appearance in the source, such as its...

2/14/11

2/5/11

2/4/11

SQL : Structured Query Language (basics)

SQL stands for Structured Query Language is a database computer language used for managing data when used with application  in a Relational Database Management System (RDBMS). There are many database software available which used the same query language. Some of them are Oracle, My SQL,...

1/24/11

1/18/11

HTML Tag Reader : Flash Application

Here is an flash application which reads some of the html tag and then gives the desired result. I have used Action Script 3 for this application. In the application you will get to know the usage of action listener (event listener), then Use of URLRequest etc. The rest I have defined belo...

1/17/11

1/14/11

Signal Program using parent-child in UNIX

Let us now write a program that communicates between child and parent processes using kill() and signal(). fork() creates the child process from the parent. The pid can be checked to decide whether it is the child(==0) or the parent (pid = child process id). The parent can then send messages...

Two processes comunicating via shared memory in UNIX

We develop two programs here that illustrate the passing of a simple piece of memery (a string) between the processes if running simulatenously: server.c -- simply creates the string and shared memory portion. client.c -- attaches itself to the created shared memory portion and uses the string...

1/13/11

Computer graphics : Hidden Surface Elimination

BACKFACE DETECTION:  In a solid object, there are surfaces which are facing the viewer (front faces) and there are surfaces which are opposite to the viewer (back faces). These back faces contribute to approximately half of the total number of surfaces. Since we cannot see these surfaces...

1/11/11

UML : Interaction Diagrams with Example

An interaction diagram is a graphical representation of how objects interact with one another in a scenario. They capture the behavior of a single use case, showing the pattern of interaction among objects. Objects communicate in an interaction diagram by sending messages. Sending a message...

1/10/11

UML : StateChart Diagram with Example

This is a concept in Object Oriented Software Engineering, which is used to describe the behavior of the system. State diagrams require that the system described is composed of a finite number of states; sometimes. The below is an state chart diagram of  An Airline reservation system. I hope...