Computer Applications
The Scanner class method used to accept words with space:
- next()
- nextLine()
- Next()
- nextString()
Input in Java
ICSE 2023
24 Likes
Answer
nextLine()
Reason — nextLine() reads the input till the end of line so it can read a full sentence including spaces.
Answered By
14 Likes
Related Questions
A mechanism where one class acquires the properties of another class:
- Polymorphism
- Inheritance
- Encapsulation
- Abstraction
Identify the type of operator
&&:- ternary
- unary
- logical
- relational
The keyword used to call package in the program:
- extends
- export
- import
- package
What value will
Math.sqrt(Math.ceil(15.3))return?- 16.0
- 16
- 4.0
- 5.0