Empty program: Difference between revisions

From Rosetta Code
Content added Content deleted
(add Java)
Line 15: Line 15:
int main ( void ) {
int main ( void ) {
return 0;
return 0;
}

==[[Java]]==
Compiler: [[GCJ]] 4.1.2

public class Empty {
public static void main(String[] args) {
}
}
}



Revision as of 16:54, 21 January 2007

Task
Empty program
You are encouraged to solve this task according to the task description, using any language you may know.

In this task, the goal is to create the simplest possible program that is still considered "correct."

C

Compiler: GCC 4.0.3

int main ( int argc, char ** argv) {
  return 0;
}

C++

Compiler: GCC 4.0.3

int main ( void ) {
  return 0;
}

Java

Compiler: GCJ 4.1.2

public class Empty {
  public static void main(String[] args) {
  }
}

Perl

Interpreter: Perl 5.8.8

#!/usr/bin/perl

Python

Interpreter: Python 2.4.3

#!/usr/bin/env python

UNIX Shell

Interpreter: Debian Almquist SHell

#!/bin/sh

Interpreter: Bourne Again SHell

#!/bin/bash