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[]