Thursday 22 December 2011

1. Which is the best?


Qus:
if(object.equals("hello"))
{
//do something;
}

if("hello".equals(object.toString()))
{
//do something;
}

sol:
The second one is good for every time. Because  if "object" may have "null" then when compare by taking first one it throws a NullPointerException.

If we compare with second one it gives "TRUE/FALSE". Means never Fail this condition. Like this we have to check conditions.

Thursday 15 December 2011

Any Doubts In BlackBerry, C, C++ and JAVA?

Hi, My name is ALI SHAIK. I am a Blackberry Application Developer in Ahmedabad.
If anyone have doubts in C, C++, JAVA and Blackberry, clarify your and our doubts in this blog.

Yours Ali Shaik.