Let's get started with a simple hello, world example.

public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");
    }

}
public class Hello1
{
   public static void Main()
   {
      System.Console.WriteLine("Hello, World!");
   }
}
<?php echo '

Hello World

'; ?>

Further down your page, you may have another set of samples. When users click a language, all of the code samples on the page are updated to show that language.

public class HelloAgain {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World! We meet again!");
    }

}
public class Hello2
{
   public static void Main()
   {
      System.Console.WriteLine("Hello, World! We meet again!");
   }
}
<?php echo '

Hello again, World!

'; ?>