We value your privacy
We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking "Accept All", you consent to our use of cookies.
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site....
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
No cookies to display.
Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.
No cookies to display.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
No cookies to display.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
No cookies to display.
Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.
No cookies to display.
Published on June 16, 2022
Compile-time errors are errors that happen when we use the incorrect syntax or semantics of any programming language. The compiler will then throw compile-time errors at us. Until all of the program’s errors are fixed, the compiler won’t allow it to execute.
Characteristics of Compile-Time Exceptions:
Example of Compile-time error
In the above code, we have tried to print the value of ‘a’, but it throws an error. We put the colon at the end of the statement instead of a semicolon, so this code generates a compile-time error.
The Errors that happen during execution and after compilation are known as runtime errors. Runtime mistakes include, but are not limited to, division by zero. Since the compiler does not flag these problems, they are difficult to find.
Characteristics of Runtime Exceptions:
Example of runtime error
In the above code, we try to divide the value of ‘b’ by zero, and this throws a runtime error.
Compile-time and Runtime are the two programming terms used in software development. Compile-time is the time at which the source code is converted into an executable code while the run time is the time at which the executable code is started running. Both the compile-time and runtime refer to different types of error.
The views expressed in this document are those of the author and do not necessarily reflect the position of the London School of Emerging Technology. View the detailed policy Disclaimer for Student and Personal Websites