Feb 16, 2012

Working with Constructors

In Java, When we  are creating a new instance of the class, the constructor of the class will be called. If a class doesn't have a constructor then it will assume there's a default constructor. But constructors are used to assign some initial values  to class fields.
Ex:
public class Employee{


  private int empID;

  private String name;


   public Employee(){
    this.empID = 1
    this.name = "Un-defined"
   }
}
We all know that we cant have two constructor in a class, with the same name and same parameters but a different data-type. But while i m analyzing this limitation, suddenly a doubt arise to me whether we can have two constructors with a single parameter, but the data Type of these parameters are different.

Ex:

public class Employee{


// Constructor 1
   public Employee(int empID){
   }


// Constructor 2

  public Employee(String name){
   }



}

Feb 15, 2012

Immutable Class in Java

A class is immutable, only if when the instance of the class cant modify its content.. This can be achieved by

  • Making a class as Final
  • Make all the fields and methods as private.
Ex:
  • String Class 
    • When you create an instance of String class, say ex: new string(); then you cant modify the content  of String class with this object reference. 

Feb 7, 2012

Experience makes the Man Perfect

Its a quite saying that "Experience will makes the man perfect". Since i bought a bike, i  never fell down and got injured. But recently, i borrowed my friends bike, which's a Scooty Pep to carry some things to my new room, for re-installation of TSky STB Setup.
        After everything got over, i was turning a corner @ a speed of 30 km/hr. The road was so muddy and the back tire of the vehicle got stuck in it and started skating and due to that i fell down .
        My Right hand palm was injured and actually the skin in the palm peeled away, so it was burning sensation to me.
This minor accident taught me to learn to drive more carefully at the corners of the road

Feb 6, 2012

Flush DNS

Sometimes its required to Flush DNS for getting a new Dynamic IP Address for your PC from the server.

To DO:

  • Open Run Command Window
    • Press "Windows + R" key or
    • Click Start and Select Run
  • Now Enter cmd and preess enter to open the Command Prompt Window
  • Type the below commands and press enter after each command
    • ipconfig/flushdns
    • ipconfig/release
    • ipconfig/renew

And for confirmation type ping www.google.com and press Enter . If Flushing DNS was successfully done, you will get an IP Address there. Type exit and press enter to close the window

Jan 3, 2012

Trip to Shivana Samudara

 "Journey will make us feel good always and memorable".This Trip started with Cloudy skies above and cold water below. It Means the water in the waterfall is very cold and the sky is cloudy and the weather is rainy. :) 
This is my first long ride in my bike..

Distance :From Bangalore : 150 kms

Route: Bangalore - Kanakapura - MallaVali -     Shivana Samudara 

Special : Water Falls

We started the trip from Bangalore @ Dec 31st Morning 6.30 am. The Sky was very clear at the time, but when we were riding the bike in Nice Road, it started drizzling. We had breakfast @ Kanakapura and we started our journey, it was raining. So it become difficult for us to race. We were ridding @ a speed of 40- 50 km speed, bcoz the road was damn good, but many hair pin bends are there. We reached the water fall by 11 am . 

First we went on a small boat to the place where the waterfall is there. Since the fall of water is heavy, bathing is prohibited there. So we can enjoy the beauty of water fall from the small boat. For this short trip, you have to pay Rs.50/-  for the boat ride. At max, five people can travel in that boat . That was nice experience.



After that we decided to bath. When we get down into the water, it was so cold. We had a blast time there by sprinkling water and swimming.. One of my friend tried to swim towards the waterfall, but due to the force of water he is swimming in the same place.
We were enjoying the bath for almost  3 hrs , after that we got tired.







When we were starting back the time is 3.00 pm, its sunny and we have decided to race that time . We raced @ average of 80 km/hr speed and we have reached some high speed of 110 km/hr speed. We reached Bangalore @ 5.30 pm in the evening and we got stuck up into new year traffic in banerghatta road.





Priya,Bala,Karthick and Me


Ashok,Bala, Prassanna and Karthick








Overall, its a nice place to visit..
Please take light weight helmets  to avoid neck pain :) 
Please comment your opinion ... 

Dec 22, 2011

Apache 180 RTR

This is my First Bike, which i bought recently [10 months back :P] . I was 6' Feet and felt  that this bike will not  be comfortable for me to ride.. But this is one of the perfect one to ride and race :) ..

Details:
Mileage : 30 km in city and 30-35 in Highway
Weight : 140 Kg
Engine: 180 cc
ABS :  no
Alloy Wheels : yes
Gears : 5

Dec 5, 2011

Roads in Chennai

After the heavy rain in Chennai, the roads were very bad. Most of the roads are having pits and mud. With every traffic, its getting even worser. The Chennai corporation need to address this issue as soon as possible.
Vehicles tyre was getting puncture almost every a week due to these roads.  Every vehicle pays road tax, but at  finally we were not getting good roads to drive..
Will the Chennai Corporation address this issue ?

Nov 21, 2011

How to Apply for Ration Card Online in Karnataka

This is the nice initiative from the Govt of Karnataka... Many people can utilize this one.. For more update.. Please visit http://ahara.kar.nic.in/

Hats off to Govt of Karnataka...