Write a short program that accepts an arbitrary number of command line arguments, and prints out those containing the character 'z'.
What will be an ideal response?
```
public class PrintZArgs {
public static void main(String[] args) {
for(String s : args) {
boolean printed = false;
for(int i = 0; (i < s.length) && (!printed); i++)
if(s.charAt(i) == 'z') {
printed = true;
System.out.println(s);
} // end if
// end inner for loop
}//end foreach
}//end main
}//end class
```
You might also like to view...
How does Anaconda set up a hard disk by default?
What will be an ideal response?
In what environment is an XMP module most likely used?
A) Laptop B) Gaming computer C) Network server D) Desktop attached to a network
In which gesture do you move two fingers apart?
A. double-tap B. slide C. stretch D. press and hold
Compare and contrast controlled psychological experiments and usability tests in the evaluation process of user interfaces. Be sure to include the benefits and limitations of each.
What will be an ideal response?