Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

public static void flip( Pair< ? , ?

flip public static void
0
Posted

public static void flip( Pair< ? , ?

0

Object tmp = pair.first; pair.first = pair.second; // error: incompatible types pair.second = tmp; // error: incompatible types } } class Test { public static void test() { Pair xmas = new Pair< String , Date >(“Xmas”,new Date(104,11,24)); Pair.flip(xmas); Pair name = new Pair< String , String >(“Yves”,”Meyer”); Pair.flip(name); } }

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.