Printing as a calculator
Computers excel at performing calculations instantly. Rather than computing values by hand, you can let Java do the math for you and display the results. Let's see this in action!
Latihan ini adalah bagian dari kursus
Introduction to Java
Petunjuk latihan
- Print the result of
1+3to the output.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
class Calculator {
public static void main(String[] args) {
// Print the result of 1+3
System.out.println(____);
}
}