lyko saha

Greenhorn
+ Follow
since Aug 21, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by lyko saha

Thanks, but it doesn't work..
Actually, I have a problem with the XML parser..
I am using the DocumentBuilder's parse method - which does not work on my program properly...
19 years ago
hi,
My java program parses an XML document with the following line:

<ORGS>
<ORG1 SID="1" BN="101" DESC="US OPERATIONS" />
<ORG2 SID="2" BN="102" DESC="CANADA UNIT" />
<ORG3 SID="3" BN="103" DESC="'SA' <BA> & "MEXICO"" />
</ORGS>

And should display a report like:
SID BN DESC
----------------
1 101 US OPERATIONS
2 102 CANADA UNIT
3 103 'SA' <BA> & "MEXICO"

But upon parsing, I get an error like:

org.xml.sax.SAXParseException: Attribute names must not start with "'" characters.

It seems like the entity references are not parsed properly.. any idea? solution? help?

Thanks..
19 years ago
Does the actual exam allows going back to a previous question?
For instance, I'm not sure of my answer in no. 12, so can I go back to that question and change my answer?
I have heard that some certification exams don't.
In Chapter 6: Objects and Classes (Sun Website) By Simon Roberts, Philip Heller, and Michael Ernest
The authors mentioned that:
�It is illegal for a package and a class to have the same name, so there can be no ambiguity.�

However, when I tried to compile the following code, it was successful.
Why is it so? I mean, how can I prove it?

package P1;
class P1 {}

This is saved as P1.java in a directory P1 (which is again in a directory specified in my classpath)
19 years ago
Is it possible to extend a non-static inner class outside of its outer class? For example:

class Outer
{class Inner {}
}
public class A extends Outer.Inner
{}

If I compile class A, I get an error:
No enclosing instance of class B is in scope; cannot create a default constructor for class A.
19 years ago