为什么我不能在字符串数组的第0个索引处输入值?

时间:2019-02-12 13:28:30

标签: java arrays string

我试图向用户询问字符串数组中字符串输入的数量,然后将输出显示为该字符串的内容以及索引号。 我只能输入大小为1的数字。值,索引位置0始终保持为空。为什么会发生这种情况?

Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:638: Received new connection: 17
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:651: New client accepted: 17
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:353: PCM requested for 00:23:01:04:95:CC type 2 stream 1
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:688: State transition: 2 -> 2
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:42 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:948: New SCO link: 18 (MTU: R:48 W:48)
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:455: PCM close for 00:23:01:04:95:CC type 2 stream 1
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:981: Closing PCM: 19
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/transport.c:958: Closing SCO: 18
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:605: Client closed connection: 17
Feb 12 13:27:55 raspberrypi bluealsa[373]: /usr/bin/bluealsa: ../../src/ctl.c:675: +-+-

1 个答案:

答案 0 :(得分:0)

使用sc.next()

那将解决您的问题