An online Java Compiler

2006/03/07 · 71 comments

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.

{ 71 comments… read them below or add one }

hana April 4, 2013 at 12:12 pm

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

Reply

Raghav August 9, 2013 at 8:22 pm

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]);
}
}
}

Reply

JDoodle July 16, 2013 at 5:45 am

Try JDoodle.com, here you can compile, run, save and share java programs online.

Reply

Leave a Comment

Previous post:

Next post: