Java has two kinds of methods: static methods and instance methods. The static methods (a.k.a. class methods) can be invoked without having a reference to an instance of the particular class. The instance methods can only be invoked on an instance of the particular class.
Oh ok, so i don't actually have to use a contructor before referencing any of the methods then, very interesting?
Lasse, does this sound like a logical way to use an XML file?
No, class "foo.bar.Xyz" does not need to import class "foo.bar.Abc" because they are in the same package.
i'm wondering about that import statement, and wanted to say that the DOM class is in the same directory as the collection class, so would i need an import statement in the collection class being the fact that the DOM class is in the same directory where i'm doing the collection JAVAC command?
I suspect that the "validation.xml" file will be relatively small so you might want to read the XML document into a DOM tree once and then make the lookups against that in-memory object model. That should be a lot faster than getting a JDBC connection somewhere and executing SQL statements...
And another thing, i'm really concerned about how efficient the XML look up is going to be versus a regular database lookup because it looks like it's going to do a simple scan to get to the correct field node, or will the DOM XML structure allow me to create keys of some sort, so i can go directly to the correct field node, does that make sense?
Originally posted by bob connolly:
Is there a generic exception class that i can use to call all exceptions as i'm not going to know what the specific excpetion classes are for those