I need to find some code which will replace the [???] to make the assertion true. However I have been stuck on this for hours. Does anyone have an idea?

`public class Exercise{
     public static void main(String [] arg){
         int foo=10; 
         assert ("Foo".equals("Bar[???]")):"assertionFoo=Bar?"; 
    }
}`

1 Answers

0
SriAji On Best Solutions
public class Exercise{
 public static void main(String [] args){
     int foo=10; 
     assert ("Foo".equals("Bar".replace("Bar","Foo")):"assertionFoo=Bar?"; 
 }
}