Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2015 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/05211ce3a45e3d8ccbda to your computer and use it in GitHub Desktop.
Save anonymous/05211ce3a45e3d8ccbda to your computer and use it in GitHub Desktop.
//*******************************************************************
// Java compiler created in PHP to quickly and safely test code.
// NOTE: please read the 'More Info' tab to the right for shortcuts.
//*******************************************************************
import java.lang.Math; // header stuff MUST go above the first class
// our main class becomes a file but the main method is still found
public class HelloWorld
{
public static void main(String[] args)
{
OtherClass myObject = new OtherClass(3);
}
}
// this will become its own file too (and these can be in any order)
public class OtherClass
{
public double x = 2.0D;
public OtherClass(int input)
{
String test = String.valueOf(x);
test += "D";
double value = Double.parseDouble(test);
System.out.print(x);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment