Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (sammie112002):

Question 1 (Multiple Choice Worth 2 points) Which of the following statements contains an error? I. Scanner in = new Scanner(System.in); II. System.out.print(Please enter your name (first last): ); III. String firstName = in.next();

OpenStudy (3mar):

Welcome to Math’s section!

OpenStudy (amorfide):

II System print, if you do a speech, it should be within speech marks so when it says Please enter your name it should be System.out.print("Please enter your name (first, last): ");

OpenStudy (amorfide):

however an alternative would be to declare a String, then print it String name = "Please enter your name (first last)" System.out.print(name + " : ");

OpenStudy (mhchen):

This is most definitely a test question. Computer Science teachers are really strict about cheating and plagiarism. Be careful. Adding on: II. System.out.print(Please enter your name (first last): ); Please enter your name (first last): is NOT in QUOTATIONS. This makes it an error.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!