if (name[name.length - 1 - 1] == null) 是什么意思???
System.out.println("欢迎使用迷你DVD管理器");System.out.println("----------------------------")...
System.out.println("欢迎使用迷你DVD管理器");
System.out.println("----------------------------");
System.out.println("1.新增DVD");
System.out.println("----------------------------");
System.out.print("请选择:");
select = input.nextInt();
switch (select) {
case 1:
System.out.println("---新增DVD");
System.out.print("请输入新增DVD的名字:");
String named = input.next();
if (name[name.length - 1 - 1] == null) {
for (int i = 0; i < name.length - 1; i++) {
if (named.equals(name[i])) {
System.out.println("新增的" + named + "已存在!");
break; 展开
System.out.println("----------------------------");
System.out.println("1.新增DVD");
System.out.println("----------------------------");
System.out.print("请选择:");
select = input.nextInt();
switch (select) {
case 1:
System.out.println("---新增DVD");
System.out.print("请输入新增DVD的名字:");
String named = input.next();
if (name[name.length - 1 - 1] == null) {
for (int i = 0; i < name.length - 1; i++) {
if (named.equals(name[i])) {
System.out.println("新增的" + named + "已存在!");
break; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询