什么是Ljava.lang.String; @ [英] what is Ljava.lang.String;@

查看:1732
本文介绍了什么是Ljava.lang.String; @的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字符串数组 selectCancel 与setter和getter方法​​,这是在我的形式复选框。我试图让检查的价值观和我得到了上述结果当我打印。

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]

(后数 @ 几乎总是不同)

请告诉我们的返回类型 Employee.getSelectCancel()

这篇关于什么是Ljava.lang.String; @的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆