- Home
- Chapter 1 - Object Oriented Programming Concepts
- Object Oriented Programming Concepts
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 2 - Introduction to Java
- Introduction to Java
- Multiple Choice Questions
- Assignment Questions
- Chapter 3 - Values and Data Types
- Values and Data Types
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 4 - Operators in Java
- Operators in Java
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 5 - User-Defined Methods
- User-Defined Methods
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 6 - Input in Java
- Input in Java
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 7 - Mathematical Library Methods
- Mathematical Library Methods
- Multiple Choice Questions
- Assignment Questions
- Chapter 8 - Conditional Constructs in Java
- Conditional Constructs in Java
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 9 - Iterative Constructs in Java
- Iterative Constructs in Java
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions and Programs
- Chapter 10 - Nested for loops
- Nested for loops
- Assignment Questions and Programs
- Chapter 11 - Constructors
- Constructors
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 12 - Library Classes
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 13 - Encapsulation and Inheritance
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 14 - Arrays
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 15 - String Handling
- Library Classes
- Multiple Choice Questions
- Assignment Questions
Input in Java
Chapter 6
Input in Java
Class 10 - Logix Kips ICSE Computer Applications with BlueJ
![]() Share with a Friend |
Multiple Choice Questions
Question 1
A programmer wrote the following statement:
netPay = grossPay + providentFund;
instead of:
netPay = grossPay - providentFund;
Assuming all the unseen code is correct, what kind of error is it?
- Syntax error
- Runtime error
- Logical error ✔
- None of these
Question 2
Which of the following might make the Java compiler report a syntax error in a particular line of a program?
- The program is typed in the wrong font.
- The line contains a comma (,) instead of a dot (.). ✔
- It is caused by Java runtime.
- Program takes too long to compile.
Question 3
Which of the following statement is true for logical errors?
- The compiler does not detect these errors.
- There is no indication of error when the program is executed.
- The program may produce correct results for some input data and wrong results for other input data.
- All of the above ✔
Question 4
Which keyword do you use to include a class in your program?
- import ✔
- export
- include
- impart
Question 5
Which of the following is not a valid method of the Scanner class?
- next()
- nextInt()
- nextLong()
- nextNumber() ✔
Question 6
Default delimiter used in the Scanner class is ...........
- Comma
- Whitespace ✔
- Colon
- There is no default delimiter.
Question 7
Which package would you import to display the date and time?
- java.util.* ✔
- java.Date.*
- java.io.*
- java.lang.*
Question 8
Which package would you import for the Scanner class?
- java.util.* ✔
- java.awt.*
- java.io.*
- java.lang.*
Question 9
Errors occur in a program when ...........
- Syntax of the programming language is not followed.
- The program does not run properly or does not execute at all.
- The program produces an incorrect result.
- All of the above ✔
Question 10
The Scanner class can be used to read input from ...........
- a keyboard
- a file
- a string
- All of these ✔
