Libania Paes

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

Recent posts by Libania Paes

Thanks, Ron!
But there�s a question before mine that says:

Please explain about & and |. Can some one run through the following example.
public class ShortCkt {
public static void main(String args[]) {
int i = 0;
boolean t = true;
boolean f = false, b;
b = (t & ((i++) == 0));
b = (f & ((i+=2) > 0));

& and | are Bitwise operators only, right??
Thanks again!
I couldn�t find anywhere in the book Java 2 Sun Certified Programmer from Osborne something about short circuit operands.
What are they?

Excuse me! May I ask something?
Why does a byte value loose precision?
If byte has 8 bits, I can say that byte x = -1 is:
1111 1111
So,if you make x >>> 5, then it should be:
0000 0111
Can you explain it to me?
You may be a bad speller, but you�re a great and quick teacher!
I think I got it!
Thanks a lot!
What do you mean by higher precedence?
Do you mean that

is the same as

Are they the same?
Thanks for your answer!
Hi! Again!
"It is illegal to have an abstract method in a class that is not declared abstract". (Osborne�s Java 2 Sun Certified Programmmer, p. 66)
Then, I found this piece of code in a question:

In theory, it�s already wrong, right? It is not a "to compile or not to compile?" question and the book is considering it right!
Thanks again!!!
Question from Osborne JAva 2 - Sun Certified Programmer:

What is the result?
a) The file will not compile
b) The file will compile, but an error will occur when class is instantiated
c) The file will compile and it will work fine
I thought the rigth answer was a) because of line 7 (can you call a class like this?)
The book is saying that it�s c)...
I don�t know if it is a print error... The book�s errata in Osbourne�s page is to an older edition of the book....
Thanks in advance!
This is the web and you can be from anywhere but... are you brazilian? If so, where can I take the xml certification?

The output is 1, 1, 0, 1.

Wait a minute... Why the last value is 1? Is it because de variable is declared static?
If so, static variables maintain the values assumed to them? They are "shared" by all the objects that call them?
I took a look at the questions and I liked very much your site. Thanks for the tip!
Thanks, now I got it!
Thanks everybody!
But I�m still confused... How does the code "know" if the method is a constructor or if is just a method with the same name?
And seconde: what�s the point on naming a method the same as the class? When you call it, it�ll be something like;?
I know that constructors can�t have a return value. Then I read this question from Osbourne�s Java2 Study Guide:

I thought it wouldn�t compile because of line 4 and 6 but the book says I�ll compile and run fine because "you can declare a method with the same name as the class name".
So... What�s the difference between constructor and method with the same name as the class name?