Java has many different types of statements. Some statements simply create
variables that you can use to store data. These types of statements are often
called declaration statements, and tend to look like this:
int i;
String s = “This is a string”;
Customer c = new Customer();
Another common type of statement is an expression statement, which performs
calculations. Here are some examples of expression statements:
i = a + b;
salesTax = invoiceTotal * taxRate;
System.out.println(“Hello, World!”);
No comments:
Post a Comment