Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
public class Quibbler {
public static String quibble(String[] words) {
String qText = "{";
for(int wIndex = 0; wIndex < words.length; wIndex++) {
qText += words[wIndex] + (wIndex == words.length-1 ? "" :
wIndex == words.length-2 ? " and " :
", ";
}
qText += "}";
return qText;
}
public static void main(String[] args) {
System.out.println(quibble(new String[]{}));
System.out.println(quibble(new String[]{"ABC"}));
System.out.println(quibble(new String[]{"ABC", "DEF"}));
System.out.println(quibble(new String[]{"ABC", "DEF", "G"}));
System.out.println(quibble(new String[]{"ABC", "DEF", "G", "H"}));
}
}