Mylene Morato

Greenhorn
+ Follow
since Feb 10, 2009
Merit badge: grant badges
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 Mylene Morato


Hi everybody,

I'm trying to do a listShuttle. But when my code runs display just de component but both lists don't , inside de component and appear no errors.

I'd like a solution.

Below are my codes :





My Bean is :




Can anybody help me?
If someone has a little project with a example, it woud be great.
Thank you.

12 years ago
JSF
Hi !

I have a doubt in this code.

The source is Iquisition.



The result is true.

But the class should override the hashCode() method to result true??
I think that hashCode() of the class Object provides different numbers of hashCode to each object .

Thanks!
I have a doubt about the output this code.

The source is iRix Technologies .Practice Test 1.



Output of 1 to 100 followed by "end".

I think that it would print just "end" because the method start() in the class Thread would call the method run(). As the method run() is not overriden then it would print nothing so the output would be just "end".

Could anyone help me?

Hi everybody,

I have a doubt about this code.





The output is 5.

The source is Whizlabs SCJP5.0.

I would like to know why the output is 5 and not 6. Because I thought that in this code the polymorphism had been applied then the call c1.getObject() would return the object B.
Can anybody help me?
Ok.
The source is learnkey MasterExam by K & B.

Hi everybody,


I have this code:



Which of the following can be inserted at // to comile the code without error?

A. public static<T> List<T>backwards(List<T> input)
B. public static<T> List<T>backwards(List<? extends T> input)
C. public static<T> List<T>backwards(List<? super T> input)
D. public static<T> List<? extends T>backwards(List<T> input)
E. public static<T> List<? super T>backwards(List<T> input)
F. public static<? extends T> List<T>backwards(List<T> input)

The output is A,B,D,E.

I would like to know why letter B is correct instead of letter C ? Because in the code above there is a add method. I think that only List<? super T> could have a add method and not List<? extends T>.

Can anybody help me?

Hello friends,


I have this code:





The output is false

Could anybod help me ?
Why the output is false?

Thanks.

Hello friends,

I have a doubt in this code :




This code prints "ABC"

I would like to know if the output would be "XYZ" as well.

In this code seems that the method Tread.sleep(1000) only is considered for the main thread.
Why not for the td thread?
Because then td thread would sleep, main thread would set the variable to "XYZ" , td would wake up and it would print "XYZ".

Can anybody help me?

Hello everybody.

I have a doubt about this code.

package teste;
class Base {
int value = 0;
Base(){
addValue();
}

void addValue(){ value += 10; }

int getValue(){ return value; }
}

class Derived extends Base{
Derived(){ addValue(); }

void addValue(){ value +=20; }
}

class Teste1{
public static void main(String[] args) {
Base b = new Derived();
System.out.println(b.getValue());
}
}


Could anyone explain why the result is 40 ?
Thanks.