vibhor sharma

Greenhorn
+ Follow
since Dec 10, 2010
vibhor likes ...
Android Eclipse IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
10
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vibhor sharma

I doubt even first one works well ..


It is not a constructor , eventually a valid java method which happens to be a same name as a class name .... remember constructors doesn't have return type, not even void .

PS : In my opinion constructors cant be inherited , be it default one ...
10 years ago
1)the second case

byte b = some byte + some byte , which will results in..(as compiler thinks ) an int type... and we are storing the result into byte type ...

Think like this .. how can a smaller cup (byte) would able to handle a larger cup (int)....excessive water gets out in the form of truncating bits..


I suggest you to read some casting basics from Kathy sierra book .. you wont regret .
10 years ago
We tried to assign the sum of two bytes to a byte variable, the result of which
is small enough to fit into a byte, How ever , we are adding something here , which means we are involving expressions .
But the compiler knows taht anything int -or -smaller expressions are always result an int (implicitly)..

it wont get complied unless explicit cast.

Hope this helps ...
10 years ago
The range of a byte is up to 127 , so first statement works fine .

in second statement you are adding two bytes , 200 , in this case and storing it again on byte type. what else would you expect ??

Can you figure out the solution ??
int b = a+a ; should work with out truncating any bits.
10 years ago
Here is my guess :

You are using version 2.3 of web.xml file , which is not only rarely used now but also order of entries matters in version 2.3.

Check if you are using any JSP expression language , because version 2.3 doesn't support EL.

change your web.xml which could support at least version 2.4 , may be it could work for you.

10 years ago

I am implementing my own myClick method which would listen for touch events , i am able to do this for an entire image .However i have an log in button embedded on image, this button should listen for touchable event not an entire screen.



public void myClick(View view)
{
// code which would listen and responds for only specific area of an image.
}
10 years ago
I have a click able image button and its working fine , How can i make only a specific part of the image button click-able , such as specified screen would respond to click events and rest of screen doesn't.

I don't want to crop my image.
10 years ago
Initially value of i=0;

now , int x=++i
i=0 initial
i=1 final

int x= ++i + i++
i=0 initial i=1 (initial)
i=1 final i=2(final)


int x= ++i + i++ + ++i
i=0 initial i=1 (initial) i=3(initial)
i=1 final i=1 (final; but i=2 will go) i=3 (final;i 's value)

1+1+3=5 (x's value)


....hope that helps

10 years ago
go to project explorer and select your project , right click on it and you will find

Run as->Run configurations->arguments -> program arguments

provide your values in the window shown, be careful to put a space between your values , apply and run

That's it !
11 years ago

follow what jasper says:
as well , change your line 16 , such as

showresult("Reult is " + execute(op1, op2));

otherwise you will get the String representation [L@3e... , instead of getting numeric literal.
11 years ago
public String toString() , method is available at java.lang.Object class , it returns the String representation of the Object.
normally when you write System.out.Print(SomeObjectRefernce), toSting() method of Object class gets called automatically.
11 years ago
@ anuj

I got the problem , in my splash.XML i dint mentioned the android:src="@drawable/backgrond" tag.

Thanks for help !!
11 years ago
@ anuj


I tried , but isn't working.
process not responding
11 years ago
@ anuj

i put my image file in res/drawable/ folder , and mapped it inside layout/splash.xml
does it work ??
11 years ago
still waiting for answer.....does any clarifications required ??
11 years ago