File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes how to fix this error [Ljava.lang.String;@1cbc933 in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to fix this error [Ljava.lang.String;@1cbc933 in java?" Watch "how to fix this error [Ljava.lang.String;@1cbc933 in java?" New topic

how to fix this error [Ljava.lang.String;@1cbc933 in java?

Arulmozhi Govindaraju

Joined: Feb 20, 2013
Posts: 17
This bean class
private String[] assinproject;
private String[] unassinproject;

public String[] getAssinproject() {
return assinproject;

public void setAssinproject(String[] assinproject) {
this.assinproject = assinproject;

public String[] getUnassinproject() {
return unassinproject;

public void setUnassinproject(String[] unassinproject) {
this.unassinproject = unassinproject;


this is action class

this is DAO class
for (int i =0; i < claimDetailsBean.getUnassinproject().length;i++ )


for (int i =0; i < claimDetailsBean.getAssinproject().length;i++ )

when execute this i got this [Ljava.lang.String;@1cbc933 please let me know what is the issue??
Mahender Parkipandla

Joined: Dec 28, 2009
Posts: 23
Did you debug in which class / line this error is coming?

Matthew Brown

Joined: Apr 06, 2010
Posts: 4542

That's not an error. It's just the result of trying to print out a String array. The toString() method on an array doesn't do anything clever, it just inherits from Object. And the version of toString() in Object prints out something that's based on the class name and the hash code. You can look at the documentation to check: java.lang.Object#toString(). The "[L" part indicates an array.

To get the effect you probably want, you need to iterate over the array and print out individual values.

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46320
My, what a lot of unindented code, and how difficult to read.
You are not getting that output from that code, because you do not have any print statements there. Your error is caused by attempting to print something. I suggest you read the documentation for the Object#toString() method, and work out exactly what the type you are printing is. You can work that out from its class name.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46320
To go all pedantic: The [ part denotes an array and the L and the semicolon are added to names of reference types.
I agree. Here's the link:
subject: how to fix this error [Ljava.lang.String;@1cbc933 in java?
It's not a secret anymore!