Hi everybody!
As was suggested here, today should be Hello World Day! So, here's my Hello World Program in Java:
Greetings,
Nepomuk
PS.: This Thread will be unstuck tomorrow, so don't worry dear fellow mods.
As was suggested here, today should be Hello World Day! So, here's my Hello World Program in Java:
Code:
import java.util.*;
public class HelloWorldDay {
public static void main(String[] args) {
ArrayList<Character> al = new ArrayList<Character>();
char[] array = {'H', '!', 'e', 'd', 'l', 'l', 'l', 'r', 'o', 'o', ' ', 'W'};
for(int i=0; i<array.length/2; i++) {
al.add(i,array[i*2]);
}
for(int i=array.length-1; i>=0; i-=2) {
al.add(al.size(),array[i]);
}
for(int i=0; i<al.size(); i++)
System.out.print(al.get(i));
}
}
Nepomuk
PS.: This Thread will be unstuck tomorrow, so don't worry dear fellow mods.
Comment