[go: up one dir, main page]

0% found this document useful (0 votes)
17 views2 pages

Icse CA Errors

Uploaded by

F4rh44n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Icse CA Errors

Uploaded by

F4rh44n
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1 6TH SUBJECT COMPUTER – Java Notes Class X

Errors

Syntax Runtime Logical


Error Error Error

Types of Errors (Icons are for illustration purposes only. FrozenNotes cannot be held liable for incorrect representation)

1.
Errors which prevent a code from execution due to
are called Compile Time Errors. These
may include mistakes like missing semicolon, missing
brackets, grammatical mistakes and more…

1.System.out.print(“Hello”) //Missing semicolon


2. public stat void hello(){System.out.println(“Hello World!”); //Missing
brackets & grammatical
3. int a=7, b=5;
4. z=a+b; //uninitialized variable z

Errors which are during the of the


program. Runtime errors occur when a program does
not contain any syntax errors but asks the computer to
do something that the computer is
.

1
2 6TH SUBJECT COMPUTER – Java Notes Class X

1. int a=248, b=0, c=0;


2. c=a/b; //Division by 0 is not possible

Error occurred when the program


the function and yields a different result.
These programs get and
executed but gives a result then what is
expected.

1. int a=34, b=7, c=0; c=a/b; //Incorrect operator


2. System.out.println(“The reminder of a divided by b is “+c+” and I’m
confident about it”);

A sequence of statements which until the


system crashes or the execution is terminated. These are
encountered/occur when the given is not
.

1. for(i=0; i<1; i--){


2. System.out.println(“Ah! I won’t stop, do whatever you can but please don’t
terminate!”);
3. }

== equals()
== is a relational operator equals() is a String class function
== can be used for all type of data Equals() can only be used for Strings
except Strings

COPYRIGHT
© 2023 by is licensed under

Report issues and suggestions: sanjayrohith@outlook.com

You might also like