Menu
Topics Index
...
`

Scanner


If you need explanation Read this topic

If you need Answer Take test on this topic

Scanner
Which line of code tells a scanner called sc to use a single digit as a delimiter?
A. sc.useDelimiter("d");
B. sc.useDelimiter("\d");
C. sc.useDelimiter("\\d");
D. sc.useDelimiter("d+");
E. sc.useDelimiter("\d+");
F. sc.useDelimiter("\\d+");
Topic: Java Regular Expression

If you need explanation Read this topic

If you need Answer Take test on this topic

User comments below. All of them might not be correct.

d

Posted by Sai Sandeep    2013-12-23 06:06:40


ans is c.. \\d uses single digit as a delimiter and \\d+ uses more than one digit as a delimiter..

Posted by Nanda Kishore    2013-12-23 07:26:35


answer is'B' it tells scanner to use single digit as delimiter

Posted by Sai Teja    2013-12-23 10:36:12


Ans is C...sc.usedelimiter("\\d") is uses single digit as a delimiter.

Posted by Ankit Mudiraj    2013-12-23 11:44:38


Congratulations Nanda Kishore. You are this dose winner. We will send you the link using which you can claim your recharge.

Posted by Merit Campus    2013-12-24 03:50:40


© meritcampus 2019

All Rights Reserved.

Open In App