Ok, so for the most part I have my code working but I can\'t seem to figure out
ID: 667187 • Letter: O
Question
Ok, so for the most part I have my code working but I can't seem to figure out the statement to read the arguments in lexicographic order:
Here is my code:
public class Argulyzer {
private String argulyze(String[] args) {
if(args != null && args.length > 0 && args[0] != null) {
String key = (String) args[0];
return "one";
}
for(int c=0;c<args.length;c++) {
System.out.println("testing");
}
return "none";
}
public static void main(String[] args) {
Argulyzer a = new Argulyzer();
System.out.println(a.argulyze(args));
}
}
Explanation / Answer
public class Argulyzer {
private String argulyze(String[] args) {
//work here
// if 1 args return "one" if 2 return larger if 3+ return smallest
for(int c=0;c<args.length;c++){
System.out.println("testing");
}
return "none";
}
public static void main(String[] args) {
Argulyzer a = new Argulyzer();
System.out.println(a.argulyze(args));
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.