An online Java Compiler

You can ‘Run’ your java code online, even if you dont have a compiler at your disposal, over here:- http://www.zamples.com/JspExplorer/index.jsp?format=jdk16cl

[update] Here is an online compiler for C#, Java, c++, Visual Basic (VB), Fortran, PHP, Perl, Ruby and many others!

CodePad is a an online compiler/interpreter with simple collaboration too.

You can paste your code to IDEOne to further compile and run.

72 thoughts on “An online Java Compiler”

  1. Write a function that returns an array of all elements of the natural numbers in order from first to last print.

    plz answer it with java and instantly

    1. There are infinity natural numbers, but this will print the first n;

      import java.lang.*;
      public class PrintNaturals {
      const int n = 10; //substitute 10 for anything!
      public static void main(String[] args)
      {
      int[n] naturals; //array of natural numbers
      for (int i = 0; i < n; i ++)
      {
      naturals[i] = i + 1;
      }
      //Now you have an array of natural numbers, now let's print it
      for (int i = 0; i < n; i ++)
      {
      System.out.print((String)naturals[i]);
      }
      }
      }

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>