srival vas

Greenhorn
+ Follow
since Oct 10, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by srival vas

Shalini, what viewpoint ??? argue with Sun if you have to,
but there is a law in place, and we follow the law, there is nothing to fake here.
Ironically, I have my own complaints against this site itself,
it allows people to ask qstns from other members, and then there
were couple of messages that gave away the qstns though indirectly,
I sent a mail to Sun, if that kind of posting was legal, and they said it was not, and they asked for the website's name,
...... I had been intending to fwd the mail to Paul Wheaton but
keep forgetting.
You remove people's id if they do not have proper name format,
should you not at least be just as strict on this, only in the
recent times I see some warnings,
I still like this site, it is the actions of a few people that
brings discredit to it, and I think that is where all the sheriffs and moderators come into picture,
static final vars MUST be initialized either in declaration or in one of static initialization blocks.NOT in constructors.The compiler does not wait until the construction of the object.
But instance final vars may be initialized in the constructor. If it is initialized in constructor, ALL CONSTRUCTORS MUST initialize the instance final var.
In both cases once it is initialized we can not reassign a new value to them
:
there u go.
continuing on this topic, how would I write a newline character
to a text file,
a character like 's', I can cast off to int and proceed but
I am stuck at a newline character.
24 years ago
Can it ever happen that while a Thread has a lock
on an Object, the Operating System can relinquish the lock, and give the object to another Thread.
for ex:
Class A
{
public synchronized mA() {... }
public synchronized mB() {... }
}
There is a Thread X that calls mA, and then wants
to call mB immediately after mA is thro', can it ever happen that X looses the lock on A (in that split second), when it has finished executing mA and still to start mB.
assumptions :
I do not put any wait, sleep, yeild etc, and no interrupt thrown
anywhere.
thanks
what would be the logic behind not allowing Interface to
be casted to a Final Class (that implements it?)
thanks
I/O
anna,
each char in "abcd" !
quote:
--------------------------------------------------------------------------------
Originally posted by Paul Anil:
That's correct. ( but only if there is no overflow etc.) For eg. It won't work in cases like this:
int x = 128;
byte b = (byte) ~x; //here b will be 127! Now figure it out.
-----------------------------------------------------------------
just to clarify though I am sure you all realised it,
b is 127 not bcos of ~, but bcos -129 (-128 -1 ) has
been casted to byte, I would assume I can still safely
assume ~n = -n -1 and then concern myself with the casts et al.
3 in binary(byte) is 00000011
if you inverse it, it should become 11111100 which is equal to 252 in decimal.
Is that not correct???
Please explain...
------------
Dev, Signed bit and 2's complement , that is the catch.
I must apologize for having used other people names, I didn't mean to take any side, I hope (and wish) moderators could edit it and remove the names or the line.
I am done with this and am back to doing the thing that
matters most here, Learn Java!!!
- thanks
The big thing is that since the name thing got to be such a problem, for the next few weeks we're really cracking down.
Paul,
what is it you (or Javaranch is) gaining by cracking down,
rules make sense, and I am sure you are playing a great role there, but in a forum ( and which I have come to like so much) which focuses on knowledge and
team-work, its strange that such a trivial issue is being focussed to "Crack Down", Dharam can get away with whatever
he says bcos he gave his name, GVS has to give an explanantion
for his lack of full name, (the name that you see on my id could be a fabricated one, GVS could be more genuine) and the topic deviates from RHE to cracking down,
dictatorship never really helps !!! it only hurts.