public class Main {
	public static void main(String[] args) {
		System.out.println("hello, world!");
	}
}
Ausgabe
Hello World!
Ausgabe durch System.out.println Fügen Sie die Zeichenfolge in "" ein. Am Ende hinzufügen
public class Main {
	public static void main(String[] args) {
		System.out.println("hello, world!");
		System.out.println("31+Führen Sie 31 Berechnungen durch");
		System.out.println(31+31);
	}
}
Ausgabe
hello, world!
31+Führen Sie 31 Berechnungen durch
62
Fügen Sie nicht "für Formeln" bei
public class Main {
	public static void main(String[] args) {
	    int x;
	    x = 6;
		System.out.println(x * x * 3.14);
	}
}
Ausgabe
113.04
int wird beim Definieren von Zahlen verwendet
Recommended Posts