Explain Semantic error

Semantic error: It is an error in the meaning of program. A statement might contain no syntax errors, however might still break the rules of Java language. For example, when ivar is an int variable, the shown statement is syntactically correct

ivar = true;

Though, it is semantically wrong, since it is illegal to assign a Boolean value to an integer variable.

   Related Questions in Programming Languages

  • Q : What is Super type Super type : It is a

    Super type: It is a type with a child sub type. The sub-type or super-type relationship is more common than the sub-class or super-class relationship. An interface which is implemented by the class is a super type of the class. The interface which is

  • Q : State Null character State Null

    State Null character: The \u0000 character. The care must be taken not to confuse this with null reference.

  • Q : Explai phases of software development

    Define the difference between phases of software development or software life cycle?

  • Q : Common Language Infrastructure or CLI

    What is the Common Language Infrastructure (CLI)? What relation does .NET have with the CLI?

  • Q : Explain the term Web Services

    Explain the term Web Services Description Language.

  • Q : State the term tombstone lifetime

    State the term tombstone lifetime attribute?

  • Q : Explain Do loop Do loop : This is one

    Do loop: This is one of Java's three control structures employed for looping. The other two are the for loop and while loop. A do loop comprises of a loop body and a Boolean expression. The condition is tested subsequent to the loop body has been fini

  • Q : Define Livelock Livelock : It is a

    Livelock: It is a situation in which a thread waits to be notified of a condition however, on waking, finds that the other thread has inverted the condition another time. The primary thread is forced to wait again. Whenever this occurs for an indefini

  • Q : State the term multi programming State

    State the term multi programming.

  • Q : Define Unconditional Jumps

    Unconditional Jumps: Jumps which are not strictly upwards in the block hierarchy can require extensive control-flow manipulation, including creation of redundant code, and should be avoided if possible. Such jumps add considerable modeling overhead fo

©TutorsGlobe All rights reserved 2022-2023.