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/29/11
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
Python Tutorial : Installing IPython (Ubuntu)
Hello Guys, Code 2 Learn starts off its Python Tutorial. Like Java, C++, C etc, Python is also a Programming Language. Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability.
IPython provides a rich toolkit to help you make the most...
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...
Java Tutorial : Identifiers, Keywords and Types
Identifiers :
In Java programming language, an identifier is a name given to a variable, class or method. Identifiers start with a letter, underscore(_) or dollar sign ($). The following characters can be digits. Identifiers are case sensitive and have no maximum length...
11/16/11
Java Tutorial : Exceptions in Java
An exception is a problem that arises during the execution of a program. An exception can occur for many different reasons, including the following:
A user has entered invalid data.
A file that needs to be opened cannot be found.
A network connection has been lost in the middle of communications,...
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
5 Easy Ways to get Traffic from Facebook

This is my First Guest Post on Code 2 Learn. and my personal Blog is DailyTechTips for SEO and Wordpress Stuff.
No Doubt Facebook is the best Social Networking Site. It gets Millions...
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
Public static void main(String args[]){} : Explained
public static void main(String args[]){
}
Now lets understand why do we write the above statement, the way it is written above.
Why not change it?
Before we move to the topic make sure you understand the Keyword Static, to learn about it here is our tutorial on Static Keyword in Java.
The...
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
RIP Steve Jobs (1955-2011)

60 Most Inspiring Quotes from STEVE JOBS (1955-2011) :
RFAZHE7YNFV8...
10/1/11
Java Programming with Eclipse : Basics
This is intended to be a basic guide to using Eclipse.
This guide is by no means comprehensive, but is
sufficient to give you enough knowledge to work on your projects. Running and using Eclipse should be the same regardless of operating system.
Obtaining...
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
HeapSort ( array Based) implementation in Java
There are two types of heaps. First one is Max heap and second one is Min heap. Heap (Max/Min) is a special type of binary tree.The roots of the max heap is greater than its child roots. Other heap is Min heap it is also a special type of heap which has minimum root than his child. We can sort...
9/17/11
Binary Search Tree : Basics
A Binary Tree is a tree data structre in which each node has atmost two child nodes, usually called as 'left' and 'right' child respectively.
Binary Tree...
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
Insertion sort with program code and tutorial
Insertion sort is divided into two parts:
1. Straight Insertion Sort
2. Shell Sort
Insertion sort is a simple sort algorithm, a comparison sort in which the sorted array [or list] is built one entry at a time. It is much less efficient on...
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
Merge Sort using Java with program code
In computer science, merge sort or mergesort is a sorting algorithm for rearranging lists (or any such linear sequential data storage structure) into a specified order. It is a particularly good example of the divide and conquer algorithmic paradigm. It is a comparison sort. Merging is the process...
7/1/11
Microsoft SQL Server 2008 connection using ODBC tutorial
My previous post was on SQL Server installation . Now today I will be telling how to connect your database ie SQL Server using ODBC with Netbeans.
After you installed SQL Server 2008 Express successfully, now its time to make you of it. So ...
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
Microsoft SQL Server 2008 installation tutorial
Using Microsoft SQL Server 2008 for the first time for me was difficult because of it UI. So I thought I would make a post for the rest of the people.
MicrosoftCertifications requires an individual to know about installing, troubleshooting, and maintaining Microsoft’s many products, like the...
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
Image Processing : Morphology based Segmentation using MATLAB with program code
Segmentation or contouring could be also obtained using morphological operations. Segmentation subdivides an image into its constituent regions or objects. The level to which the subdivision is...
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
Excel Formulas and Formatting Data tutorial
Excel Formulas and Formatting Data
You are familiar with the Excel 2007 . A major strength of Excel is that you can perform mathematical calculations and format your data. In this lesson, you learn how to perform basic mathematical calculations and how to format text and numerical data. To...
5/18/11
Java: Declaring Your own Exceptions tutorial
You can create your own exceptions in Java. Keep the following points in mind when writing your own exception classes:
All exceptions must be a child of Throwable.
If you want to write a checked exception that is automatically enforced by the Handle or Declare Rule, you need to extend the Exception...
5/5/11
Image Processing : Histogram Equalization using MATLAB code
% MORPHOLOGY
% histogram equalisation
filename= 'far.jpg'; % the filename to be read
im=imread(filename);
im=imresize(im,[256,256]);
im=rgb2gray(im);
figure(1);
subplot(1,2,1);
imshow(im...
4/14/11
Javascript : Dynamic Pop-Up Menu (feels like AJAX)
Here is a piece of code that makes you feel that you are using AJAX on your website but actually you are nor, you are only using Javascript. Javascript enables us to make a POP-UP MENU and thus by this making our website more dynamic...
Numerical Analysis : Runge Kutta Method
Runge Kutta method is a part of numerical analysis. Its an iterative method. To know more read :- CLICK
Java Code for Runga Kutta ...
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
Image Compression using DCT and FFT techniques
Here we take a file and then compress the file applying DCT and FFT on the image. The compression is done
1. 70%
2. 50%
3. 30%
4. 10%...
3/6/11
Android App : Ring Profile Changer
Here is an App which will reduce the work load of the users of Android phones, as they wont have to go to settings to change their ring mode when in office, college or meeting, they can just use this app and change their mode in one tap on the screen...
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
Image Processing : Edge Detection of Image Using MATLAB

There are many operators in MATLAB for finding images
1. Sobels Operator
2. Roberts Operator
3. Prewitts Operator
4. Laplacian of Gaussian Method
5. Zero-Cross Method, etc..
To use them in MATLAB there...
2/5/11
Working with DOM,nodes and Objects : Inserting Nodes (part 3)
This Post is a continuation of my previous posts ie Adding Nodes and Deleting Nodes. IN this post i am tell how you can add nodes between any two nodes...
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
Working with DOM , nodes and Objects (part 2) : Deleting Nodes
As my last post of DOM was on Adding nodes here is a post that will help you in deleting the last entered node. ie DELETING Nodes....
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
Working with DOM , nodes and Objects (part 1) : Adding Nodes
JavaScript is an Object Oriented Programming (OOP) language.
An OOP language allows you to define your own objects and make your own variable types.
Note that an object is just a special kind of data. An object has properties and methods.
The HTML DOM is a W3C standard and it is an abbreviation...
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...