hi
Can anyone solve a small doubt of mine in java. I am wrting a program in java for changing color schemes in this programming language so please can anyone help me in this
hi
Can anyone solve a small doubt of mine in java. I am wrting a program in java for changing color schemes in this programming language so please can anyone help me in this
import java.util.Map;
import java.util.TreeSet;
public class GetEnv {
/**
* let's test generics
* @param args the command line arguments
*/
public static void main(String[] args) {
// get a map of environment variables
Map<String, String> env = System.getenv();
// build a sorted set out of the keys and iterate
for(String k: new TreeSet<String>(env.keySet())) {
System.out.printf("%s = %s\n", k, env.get(k));
}
}
}
Bookmarks