Java/C++ polyglot

Today I discovered Java's "inline C++" keyword, //\u000a/*, which makes a Java/C++ polyglot pretty easy:

#include <iostream>

#define private
#define public
#define static
#define void int
struct {
  std::ostream &println(const char *c) {
    return std::cout << c < < std::endl;
} out;

import static java.lang.System.out;

public class Polyglot {
  public static void main(/*\u002a/String[] args//*/
      ) {
    out.println("Hello from whatever language this is!");

// */

Eclipse deals.. okay. The red-underlining in the commented sections is for the spelling. <3

Commenting is disabled for this post.

Read more of Faux' blog