什么是 Ljava.lang.String;@ [英] what is Ljava.lang.String;@
本文介绍了什么是 Ljava.lang.String;@的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有 setter 和 getter 方法的字符串数组 selectCancel
,它是我表单中的一个复选框.我正在尝试获取已检查的值,并且在打印时得到了上述结果.
I have a string array selectCancel
with setter and getter methods, which is a checkbox in my form. I am trying to get the checked values and I am getting the above result when I print.
我尝试了 Arrays.toString()
方法,但它仍然打印相同的内容.
I tried the Arrays.toString()
method but it still prints the same.
然后我做了以下事情:
String checked = Arrays.toString(Employee.getSelectCancel());
我也尝试过 Arrays.asList()
和 Arrays.copyOf()
那么,我如何读取这个字符串?
So, how do I read this string?
推荐答案
如果您提供数组,该方法有效.
The method works if you provide an array. The output of
String[] helloWorld = {"Hello", "World"};
System.out.println(helloWorld);
System.out.println(Arrays.toString(helloWorld));
是
[Ljava.lang.String;@45a877
[Hello, World]
(@
后面的数字几乎总是不同的)
(the number after @
is almost always different)
请告诉我们Employee.getSelectCancel()
这篇关于什么是 Ljava.lang.String;@的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文