Public paste
C# vs java
By: microhaxo | Date: Jan 13 2010 22:15 | Format: None | Expires: never | Size: 380 B | Hits: 573

  1. C# Code
  2. string[] greek_alphabet = {"alpha", "beta", "gamma", "delta", "epsilon"};
  3.  
  4. foreach(string str in greek_alphabet)
  5.   Console.WriteLine(str + " is a letter of the greek alphabet");
  6.  
  7. Java Code
  8. String[] greek_alphabet = {"alpha", "beta", "gamma", "delta", "epsilon"};
  9.  
  10. for(String str : greek_alphabet)
  11.   System.out.println(str + " is a letter of the greek alphabet");