A good answer might be:

No. The incorrect splittings are highlighted in red:


cla
   ss example
{

  public static void main ( String[] args )
  {
    long   hoursWorked = 40;    
    double payRate     = 10.0, taxRate = 0.10;    

    System.out.println("Hours 
        Worked: " + hoursWorked );

    System.out.println("pay Amount  : " + (hours
        Worked * payRate) );

    System.out.println("tax Amount  : " + (
        hoursWorked * payRate * taxRate) );
  }
}

The last statement is correct, although not done in a good style for easy human comprehension. The extra blank lines are OK.

Assignment Statements

So far, we have been using the value initially put into a variable, but not changing the value that a variable holds. Of course, variables are expected to vary by having new values placed into them as the program runs. An assignment statement is one way to change the value in a variable. Here is a program that uses an asignment statement:


class example3
{
  public static void main ( String[] args )
  {
    long payAmount ;  //a declaration without an initial value

    payAmount = 123;  //an assignment statement
    System.out.println("The variable contains: " + payAmount );
  }
}
The assignment statement puts the value 123 into the variable. In other words, when the program is executing (as bytecodes on the Java interpreter) there will be a 64 bit section of memory that gets the value 123.
Remember that the word "execute" is usually used for "run." One speaks of "executing a program" or "executing" a line of the program.

Click here for a tedious

QUESTION 10:

What does the program print to the monitor?

Click Here after you have answered the question