You are on page 1of 6

Assignment operator

Program errors:

LINE 12: cannot find symbol vqr

LINE 15: Unclosed string literal

LINE 18: Not a statement

LINE 21: unexpected type (because of the plus sign it became an assignment operator instead if
executing and declaring it into left side equal to right side. )

LINE 24: bad operand types for binary operator ( in this line error as what we observe there is something
wrong in the declaration of the program that is why bad operand types for binary operator shows.
Because the x sign is not compatible and it is in improper use. The correct declaration there is the plus
sign.

Process/Debugging Output
Increment and Decrement Operators

Process/debugging/output

Program errors

LINE 7: Variable resultnum2 is never written to ( in encoding it is important to always think first on what
name are we going to use in naming a variable. Because in this part what I did is that after encoding
everything I decided to change the name result2 into resultnum2 to make it different. I started putting it
in line 17 up to line 7.)

LINE 9: unexpected type ( instead of plus it became equal. It is very important to be mindful in
programming because sometimes we thought we encode it right but then we forgot to combine it with
shift)

LINE 11: illegal start of expression ( this error line shows because I mistype it into = then I didn’t
backspace it and continued to type it with the shift)
LINE 14: <identifier> expected (shows because we all know that java has rules and in this line the code
doesn’t comply with the syntax. An error exists in just simple mistakes. Like the period in this
line)

LINE 16: variable resultnum2 might not have been initialized (this error line shows because the
declaration of my variable didn’t have initial value, as what it shows the line has a += instead of just an =
sign. Whenever we misplaced a sign or symbol while encoding the program will not be able to read it
because the declaration that we are doing is beyond the programs rule)

Java instanceof Operator

Program errors

Line 7: missing method body, initializer can be static ( Because of the semicolon a program error arouse.
The reason why line 7 has a program error because I declared the opening or start of the program as a
statement. And we all know that public static void. Serves as the entrance point where we can run a
program)

LINE 8: Empty character literal

Line 9: variable result is never read (in this line program line 12 affects line 9 because of the
inappropriate operation or wrong declaration)

Line 11: empty statement (we always put semicolon in the end of the line program to declare it as a
complete statement in this part the semicolon was doubled that is why this error shows.)

Line 12: as of release 9’_’ is a keyword, and may not be used as an identifier ( as what we observe there
is an underscore which is not part of the program. That is why this error arouse. The error explained it
that underscore is only a keyword)
Process/debugging/output

Java Ternary Operator

Process/debugging/output
Program errors

Line 10: Variable februaryDays is never read ( line 13 affects the line 10 because the decleration is
inappropriate)

Line 11: Illegal start of expression ( in this part the error is equal sign that is why there's an error in the
declaration)

Line 13: : expected (In this error the statement or the declaration is not complete that is why it is cannot
be execute. Putting colon is important because it separates the statement )

Line 13: incompatible types int cannot be converted to Boolean ( in this line error instead of checking
the relation of equality, the program cannot be execute because it is not the proper relational operator

Line 14: void cannot be dereferenced ( I mistyped the period before the semicolon that is why this error
shows. The program mistook my mistyped as accessing or retrieving the value pointed to by a reference.
Base on my understanding in this void means null, where there is no particular type of data that must be
returned in short the function doesn’t return a value because it is just a mistake and there is no value
indicated in the line it is just a declaration to print an output)

You might also like