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...