Jan 6, 2011

Worst Ever Umpiring Decision

My First Blog

To be frank with you guys, i have started writing blogs only for money. When i was doing my pre-final year[third year] of my bachelor degree, i got inspired by my cousin. She encouraged me to write blogs to improve my knowledge. On her advice, i started writing blogs. I dont have internet connection in my home, so i would be visiting Internet CAFE daily and write posts. I would dream a lot to get more money daily. As day grows, i started writing posts for me. I used the blog to express my views and not for money. So i started writing what i see and what i learn day by day.
So this is my diary which is open to all.

Jan 5, 2011

My 2011 Resolution

  • Need to be more technically strong in Java
  • Need to learn Hindi[one of the major Indian Language]
  • Dancing and Swimming
  • 6 Pack for my body
Hope i will fulfill my resolution this year...!

Dec 23, 2010

Binary to Decimal in Java

Code:
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class BinarytoDecimal {

    public static void main(String[] argsthrows Exception {
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Enter the binary value:");
         String binary = br.readLine();
        System.out.println("Decimal value is : "+Integer.parseInt(binary,2));

    }
}
Output:


Enter the binary value: 110
Decimal value is : 6

Decimal to Binary in Java

Code:
import java.lang.*;
import java.io.*;
public class DecimalToBinary{
  public static void main(String args[]) throws IOException{
  BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
  System.out.println("Enter the decimal value:");
  String decimal= bf.readLine();
  int i = Integer.parseInt(decimal);  
  String binary = Integer.toBinaryString(i);
  System.out.println("Binary: " binary );
  }
}  


Output:


Enter the decimal value: 15
Binary: 1111

Dec 20, 2010

Free ATM Card

In almost all banks in India , if you open a savings account, they will offer you ATM card for free, in oder to withdraw money. But recently i have seen an Adv from a popular bank in bangalore. The Adv goes like this
"Open a Savings Account in our bank and We will offer you Free ATM card".
The Adv is funny isn't it..!!!

Dec 18, 2010

Black and White, Read All over

If any one ask this question to you, they would be spell "READ" as "RED". Dont get confuse, because the answer is very simple. Its "NEWS PAPER". The letters are in black color and its printed in a White sheet and it can be read all over the world.
Thats what its called as "Black and White, Read All over".