Input in Java - ICSE Class 9 Computer Applications Notes, Diagrams and Solved Questions

The structure of a Java program, the Scanner class and its methods, initialisation, comments, and syntax, runtime and logical errors.

In this chapter

  • The basic structure of a Java program (the syllabus template)
  • Three ways to give data: initialisation, parameters and the input stream
  • Packages and import: java.lang and java.util
  • Taking input with the Scanner class
  • All the Scanner methods, and the nextLine trap
  • Syntax, runtime and logical errors
  • Single-line and multi-line comments, and exam tips