Thursday 29 September 2011

Tuesday 27 September 2011

Practice on Data Interpretations Questions .................

Q: 1
 INCOME: 1. Money from fund raising programmers, 2. Grant from the government, 3. Contributions from individuals, 4. Contributions from corporations, 5. Contributions as commodities. EXPENDITURE: 1. Education of the illiterate, 2. Food for the poor, 3.Management and salary of staff and 4. Expenses to organize fund-raising programmers above charts show the amounts of an NGO where Income for the year 1998-1999 = $ 55 Man and Expenditure for the same year = $54Mn.


1.   What percentage of the total expenditure does management and salary account for?

      1.  30%
      2.  3%
      3.  8.3%
      4.  3.4%
      5.  5.7%
Answer: 3

Sunday 25 September 2011

Learning English - Lesson One bye My Own Way.....


When we meet to meet someone whether it is person we know or someone we are meeting for the first time.
Howdy friend
Wht’s up?
How’s it going ?
Wow its good to see u ?
Hey there hey how r u doing ?
Hello,how have you been ?
Its good to see you how’s life treating you?
Good to meet u

Analytical Puzzles And Problems


1. You are driving down the road in your car on a wild, stormy night, when you pass by a bus stop and you see three people waiting for the bus

An old lady who looks as if she is about to die.
An old friend who once saved your life.
The perfect partner you have been dreaming about.
Knowing that there can only be one passenger in your car, whom would you choose?   
Answer: The old lady of course! After helping the old lady into the car, you can give your keys to your friend, and wait with your perfect partner for the bus

2. Acting on an anonymous phone call, the police raid a house to arrest a suspected murderer. They don't know what he looks like but they know his name is John and that he is inside the house. The police bust in on a carpenter, a lorry driver, a mechanic and a fireman all playing poker. Without hesitation or communication of any kind, they immediately arrest the fireman. How do they know they've got their man?

                               
Answer: The fireman is the only man in the room. The rest of the poker players are women.

3. A man lives in the penthouse of an apartment building. Every morning he takes the elevator down to the lobby and leaves the building. Upon his return, however, he can only travel halfway up in the lift and has to walk the rest of the way - unless it's raining. What is the explanation for this?

               

Important Question of java...............


Q: What is the instance variables?
Instance variables are the methoda which act on the instance variables of the class. To call the instance methods.
Objectname.method().
Q: What are the static  methods?
Static methods are the methods which do not act upon th instance variables of a class. Static methods are declared as Static.
To call static methods we need not create object.

This is example
class Sample {
                static double sum(double num1,double num2)
                {
                                double s=num1+num2;
                                return s;
                               
                               
                }
}
                class method
                {
                                public static void main(String[] args) {
                                                double x=Sample.sum(10, 20.5);
                                                System.out.println(x);
                                }
                }
The reason why static methods can not act on instance variables is that the jvm first executes the static methods and then only it creates the objects.since the objects are not aviavble at the timeof calling the static methods.
This is program give a error.
Class  Test
{
Int x;
Test(int x)
{
this.x=x;
}
Static void access()
{
System.out.println(“x=”+x);
}
}
Class Demo
{
public static void main(String[] args)
{
Test obj =new Test(55);
Test.access();
}
}


Q: what is differnce b/w instance variables and class variables ?
Instance variables whose separate copy is aviable to each objact.
A class variables is a variable whose single copy in memory is shared by all the objects.
Instace variables are created in the objects in heap memory. Class variables are store on method area.

Imp property of static method…
Static call first even from main method..
class static1
{
     
      static
      {
            System.out.println("static block");
      }
     
      public static void main(String[] args) {
            System.out.println("static method");
      }
}