如何存储用户数据,当数据重复时应显示错误。

huangapple go评论64阅读模式
英文:

How to store user data and when the data is repeated it should show error

问题

例如,
如果有4个名为A1、B1、C1、D1的插槽。如果第一个用户输入A1,当第二个用户输入相同的插槽时,应该报错,因为该插槽已经被选择。

英文:

Example
if there are 4 slots named A1,B1,C1,D1. If first user enters A1 and when the second user enter the same slot it should error it has already been chosen.

答案1

得分: 1

内置类java.util.HashMap可以做到这一点。阅读文档,也许搜索一些用法示例 如何存储用户数据,当数据重复时应显示错误。

英文:

The built-in class java.util.HashMap can do that. Read the docs, perhaps search for some usage examples 如何存储用户数据,当数据重复时应显示错误。

huangapple
  • 本文由 发表于 2020年9月26日 12:59:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/64074067.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定