Java |
Java is a strongly-typed object-oriented language
developed by SUN. Case sensitivity.
class Hello
{
public static void main(String[] args) {
System.out.println("hello, world");
}
}
//you must save the file with .java extension
//from command line to compile it
>javac Hello.java
//generate a Hello.class file and run it
>java Hello
hello, world
|
|
C# |
C# is a strongly-typed object-oriented language
developed by Microsoft. Case sensitivity.
class Hello
{
static void Main() {
System.Console.WriteLine("hello, world");
}
}
//by convention, save the file with .cs extension
//from command line to compile it
>csc Hello.cs
//generate a Hello.exe file and run it
>Hello
hello, world
|
|