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 : Define Java virtual machine or JVM

    Define Java virtual machine (JVM): A Java Virtual Machine (JVM) is an abstract computing machine, or virtual machine (set of computer software programs and data structures) which is a platform-independent execution environment that converts Java bytec

  • Q : What is an Attribute Attribute : It is

    Attribute: It is a particular usage of an instance variable. The set of attribute values held in a specific instance of a class state the current state of that instance. A class definition might impose specific constraints on the valid states of its i

  • Q : Define Multiple Inheritance Multiple

    Multiple Inheritance: In C++, multiple-inheritance occurs when a class inherits from more than one parent. For example: 524_mult</span></p>
                                        </div>
                                        <!-- /comment-box -->
                                    </li>
   
   </td>
	</tr><tr>
		<td>
       
      <li>
                                        <div class=

    Q : Basic features of OOPs Illustrate the

    Illustrate the basic features of OOPs?

  • Q : Define HyperText Markup Language

    HyperText Markup Language: The HyperText Markup Language (abbreviated as HTML) is a simple presentation language employed to markup the content of the Web pages. Its tags appear frequently in pairs to mark sections of text which must be represented in

  • Q : ERD What is the meaning ofDerive the

    What is the meaning ofDerive the department and staff relations from the following ERD.

  • Q : Program for Linux operating system that

    Write a program for Linux operating system that uses Posix threads to sort a large array.  Specifically, you should write a program to generate random numbers. Then create at least two threads, each of which sorts a portion of the array. After the thr

  • Q : State the term non-XML resources State

    State the term non-XML resources?

  • Q : Examples in Threading in Java I need

    I need urgent help in Examples of Threading in Java

  • Q : Maintaining audit trail of product

    The accuracy of product table data is crucial and the Brwebean’s. owner prefers to have an audit file which contains information regarding all DML activity on the BB_PRODUCT table. This information must point out the user id of the user running a DML statement,

©TutorsGlobe All rights reserved 2022-2023.