Hello,
When I try run Java code in Xcode it just pops up with a window that says in big blue letters "Java Application" and when I look in the console for stuff I've output via System.out.println() it's empty.
So, if anyone out there uses Xcode for Java, could you enlighten me as to what I'm doing wrong?
I can't even make Xcode display the result of a conversion Celsius to Kelvin.
Here's my code:
EDIT:
I got it now...
Theres one more question:
How can I run two .java files at once?
Like, I created both on the same project with each one with its own main method, but everytime I open the console and run the files, I just see the results of the first one!
Example:
I did the method above, then I created another java class to make a method Celsius to Fahrenheit and want to print it on the console, but I just see the results of the Celsius to Kelvin!
Can anyone help me?
Thanks!
When I try run Java code in Xcode it just pops up with a window that says in big blue letters "Java Application" and when I look in the console for stuff I've output via System.out.println() it's empty.
So, if anyone out there uses Xcode for Java, could you enlighten me as to what I'm doing wrong?
I can't even make Xcode display the result of a conversion Celsius to Kelvin.
Here's my code:
Code:
public static double celsiusToKelvin (double celsius) {
return celsius + 273;
}
Code:
public static void main (String[] args) {
System.out.println(celsiusToKelvin(10.3));
}
EDIT:
I got it now...
Theres one more question:
How can I run two .java files at once?
Like, I created both on the same project with each one with its own main method, but everytime I open the console and run the files, I just see the results of the first one!
Example:
I did the method above, then I created another java class to make a method Celsius to Fahrenheit and want to print it on the console, but I just see the results of the Celsius to Kelvin!
Can anyone help me?
Thanks!