Marco Antonio Reis

Greenhorn
+ Follow
since Sep 26, 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 Marco Antonio Reis

Hi. Do you think we have an increase of salary after certification? Or just a SCEA makes difference?
I'm thinking to apply for a job in Australia in a few months. This post is because of this.

Bye.
Hi, everybody!
I need some help in this advanced topic.
I wrote the following code at Eclipse and doesn't show me any problem, so I can run the teste without problems.
But when I try to compile the classes using JDK (command line or ant) I have the following error:
Test.java:9: incompatible types
found : java.util.Iterator<Person>
required: java.util.Iterator<IPerson>
return generaliza(iter);

The classes:
import java.util.*;
public class Test {
public <T, S extends T> Iterator<T> generaliza(Iterator<S> iter) {
return null;
}
public Iterator Iterator<IPerson> test (Iterator<Person> iter) {
return generaliza(iter);
}
}

public interface IPerson {
public String getName();
}

public class Person implements IPerson {
private String name;
public String getName() { return name;}
public void setName(String name) {this.name = name;}
}

The code works at Eclipse, but I have that error compiling in command line.
Do you know what happened!?!?!?!?!
18 years ago
Quite simple, friend. Try adding this tag.

I hope its useful.


<relationships>
<ejb-relation>
<ejb-relation-name>Parent-to-Children</ejb-relation-name>
->>>> <foreign-key-mapping /> <<<<<-
<ejb-relationship-role>
<ejb-relationship-role-name>Child-has-one-parent</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>cartid</field-name>
<column-name>cartid</column-name>
</key-field>
</key-fields>