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 canonical string representation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "canonical string representation" Watch "canonical string representation" New topic

canonical string representation

John Davis
Ranch Hand

Joined: Nov 02, 2000
Posts: 189
I tried to instantiate an object of the class UUID but the constructor requires a String argument which is a "canonical string representation." This requirement seems to be a bit obtuse. Does anybody know what a "canonical string representation" is, and of what?
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

You'd have to tell us where the class UUID is coming from; there's no such class in the J2SE 1.4 API, for example. What package is your UUID class in? There's an org.w3c.util.UUID floating around, but it doesn't have such a constructor.

[Jess in Action][AskingGoodQuestions]
a young

Joined: Aug 05, 2003
Posts: 11
well since this is the beginner forum I'm gonna assume the answer is easy:
instead of doing this:
UUID yourUUID = new UUID();
do this:
UUID yourUUID = new UUID("Some String goes here");
I agree. Here's the link:
subject: canonical string representation
It's not a secret anymore!