+ 11
Why is the answer "java.io"?
A challenge question asked what should be imported to accept user input; Options were: java.nio java.util java.io and some other one. I chose java.util but failed it, why is the correct answer java.io(is it BufferedReader they mean and if so, that means there are two answers right?)
3 Answers
+ 12
Lemme guess: (Not a java programmer though)
Is it because
io means input/output
whereas util is utility
I think io mainly deals with input/output of files, user input etc
while util deals with utility objects like ArrayList, HashMap, Methods etc..
đđ
+ 11
@Cool Codin,by java.util it means java.util.Scanner, Scanner class is for taking input, which is why I was confused, will report the question as Gordie said