Javaは初めてですが、プログラミングの経験はあります。Java言語でプログラミングする方法についての本を読んでいます。NetBeans と Java に関する知識が不足しているため、進歩が妨げられています。私の特定の問題は、出力ボックスに適切な出力が表示されないことです。コード問わず。
ここに例があります。細部が欠けていると確信しています:
public class Weather
{
public static void main(String[] arguments)
{
float fah = 86;
System.out.println(fah + " degrees Fahrenheit is ...");
//To conver fahrenheit to Celsius
//Begin by subtracting 32
fah = fah - 32;
//divide the answer by 9
fah = fah / 9;
//multiply that answer by 5
fah = fah * 5;
System.out.println(fah + "degree Celsius is ...");
float cel = 32;
System.out.println(cel + "degress Celsius is ...");
//To convert Farhenheit to celsius
//begin by multiplying 9
cel = cel * 9;
//divide answer by 5
cel =cel / 5;
//add 32 to the answer
cel = cel + 32;
System.out.println(cel + "degrees Farenheit");
}
}
出力ボックス:
run:
Error: Could not find or load main class weather.Weather
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)