String[] to String
- From: "Sathyaish" <sathyaish@xxxxxxxxx>
- Date: 5 Apr 2007 07:40:01 -0700
/* I am writing this class to see the output of:
args.toString();
I want to see if the toString() method on the String[] will convert
the array contents into one string or it will write out it's type
name,
i.e. the <code>Class</code> class' name.
As observed, the output is
[java.lang.String@1693e2;
which looks like the array's underlying type's name and the starting
memory address.
*/
public class Ats /*implying Array To String */
{
public static void main(String[] args)
{
if ( args.length == 0 )
System.out.println("Usage: ats arg1 [arg2 [arg3...]]");
else
System.out.println(args.toString());
}
}
.
- Follow-Ups:
- Re: String[] to String
- From: Jason Cavett
- Re: String[] to String
- From: Oliver Wong
- Re: String[] to String
- From: Sathyaish
- Re: String[] to String
- Prev by Date: Re: [OT] Is "via JavaKB.com" spam?
- Next by Date: Re: String[] to String
- Previous by thread: Sequence of calling super's constructor in Java
- Next by thread: Re: String[] to String
- Index(es):
Relevant Pages
|