C Dinesh Kumar

Greenhorn
+ Follow
since Jan 06, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by C Dinesh Kumar

long l = 130L;
byte b = (byte)l;

From the above statment you are assigning 130 to a byte b.but the byte can hold the value in between 127 to -128. so if you store value greater than 127 it will go to negative half for example if you store 128 means it will take as -128 and 129 means -127 and it will go like that.

Or else you can think in this way...

130 can be represented in binary form as 10000010. here the first bit(from left) indicates whether it is a positve or negative number.if it is set it indicates negative number.so take the 2's complement for the number 130

130=============10000010
1's complement==01111101
2's complement== 1(+)
(add 1 to -----------
1's complement) 01111110
-----------

01111110 is -126

hope you understand


regards
Dinesh
Great.... it is the easy way to remember,,,
hello
i am having doubts about the type of transaction ie required,require new,mandatory... that we use in ejb-jar,xml file.i need the differnce btween these transaction. which one is more feasible and why?
Hello
i need to know the comparison between JSP and Servlet. JSP also internally converting to Servlet then what is the difference.
19 years ago
JSP