Scratch A To Z
Scratch A To Z
of Computer Science
Class- VIII
Ch 4. Program Coding
Unit 3: Compiling and Executing program
Class-VIII
Page 1
3. How to write Output Statement in Java program?
Ans- The statement which is used to get the output of the program or to
display messages on the screen, is given as:
System.out.println();
Syntax: <Output statement><message or message with a variables>
E.g. System out.println("Welcome to Java Programming");
Output: Welcome to Java Programming
Class-VIII
Page 2
done by using InputStream class.
Class-VIII
Page 3
operation that is impossible to carry out the program execution
time. For example, a program error may result from an attempt to
divide by zero.
Logical Error- These errors will occur when the output of an
operation may produce unwanted or unexpected results for the
entered set of input data. For example, expecting difference
between two numbers as output but operation performs for addition
----------------End of Note----------------
Class-VIII
Page 4