0% found this document useful (0 votes)
21 views1 page

Java Class 11 Notes

The document outlines three types of errors in programming: Syntax Errors, which are detected at compile time; Logical Errors, which involve incorrect logic; and Runtime Errors, which occur during execution. It explains the process of converting source code to object code in Java, detailing the roles of the compiler and interpreter. Additionally, it provides information on file extensions for Java source and byte code, and includes a brief reference to the ASCII table.
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)
21 views1 page

Java Class 11 Notes

The document outlines three types of errors in programming: Syntax Errors, which are detected at compile time; Logical Errors, which involve incorrect logic; and Runtime Errors, which occur during execution. It explains the process of converting source code to object code in Java, detailing the roles of the compiler and interpreter. Additionally, it provides information on file extensions for Java source and byte code, and includes a brief reference to the ASCII table.
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/ 1

Notes

Types of errors: Syntax Error, Logical Error , Runtime Error

Syntax Errors (Compilation Error or Grammatical Error): Writing mistakes such as missing semicolon, missing
brackets, extra brackets, using unnecessary symbols are examples of Syntax Error.

Only this error is detected at compile time by compiler

Logical Error: Writing wrong logic like, using + where – is needed, incorrect mathematical expression.

Runtime error (also known as Exception): These errors get detected at runtime. Dividing a number by 0, finding
square root of a negative number – these are examples of run time error

Source Code: The High level code written by user is known as source code

Object Code: The Machine language Code (binary) we get after compiling the high level code is known as Object
Code

Some languages use compilers , others use interpreter, Java uses both:

In java, the user written source code (High Level Code) is compiled by java compiler and byte code is created , this
byte code is again given to java interpreter which converts the byte code into object code (Machine Level Code)

Source Code → Compiler → Byte Cde → Interpreter → Object Code

** Extension defines type of a file, for example music files are .mp3 , video files are .mp4 , MS WORD is .docx ,
powerpoint has .ppt , Just like that extension for java source code is .java

and extension for byte code is .class

Example: if a program has a class name “SUM” then the source code’s file name will be SUM.java and file name for
byte code will be SUM.class

JVM: Java interpreter is known as JVM (JAVA Virtual Machine)

ASCII Table:

Character ASCII CODE


A-Z 65-90
a-z 97-122
0-9 48-57
space ( ‘ ’ ) 32

You might also like