-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Hello,

> java.lang.ClassCastException: org.apache.jserv.JServConnection

A class cast exception occurs when you treat a Java object of one class
as if it belonged to another class.  This isn't allowed (for obvious
reasons) and you get an error.

For example,

public Integer getInteger(int value) {
        return new Integer(value);
}

// code snippet:
Object value = getInteger(10);
System.out.println((String)value);    // EXCEPTION
System.out.println(value.toString()); // correct

Brad Andrews


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to