-
-
Save anonymous/05211ce3a45e3d8ccbda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************************* | |
// 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