logo

Crowdly

Dada la siguiente clase:       public class DataException extends Excep...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Dada la

siguiente clase:

      public class DataException extends Exception {

             public String toString() { return "Found data fault"; }

      }

y asumiendo

que el siguiente método está definido y accesible:

      public void cleanData(String s) throws DataException {

             if ((s == null

|| (

s.contains("@")))

                        throw new DataException();

       }

¿cuál será la salida del

siguiente código?

       try

               for (String data : Arrays.asList("data", "f@5", "last", null)) {

                      cleanData( data );

                      System.out.println(data);

               }

       }

catch (DataException ex) {

             System.out.println(ex);

       }

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.uam.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!