What will be the output - what response code would you


What will be the output/
StringBuilder sb = new StringBuilder(); List letters = Arrays.asList("A","B","C"); for (String letter : letters) {
for (int i = 0; i <= letters.indexOf(letter); i++) { sb.append(letter);
}
sb.append(System.lineSeparator());
}
System.out.println(sb.toString());

2.For REST API, what response code would you return for the following cases:

a.invalid login[]
b.not found[]
c.success[]
d.server error[]

 

Solution Preview :

Prepared by a verified Expert
JAVA Programming: What will be the output - what response code would you
Reference No:- TGS02381152

Now Priced at $15 (50% Discount)

Recommended (90%)

Rated (4.3/5)