smart wrote:
>> [ pstmtdel=con.prepareStatement("delete from ICLASS where
>> Sno='"Sno"'"); ]
[quoted text clipped - 5 lines]
>>
>> Error is variable pstmtdel might not have been initialized
Apparently you only set the variable down one path of the branch, and not the
other.
'pstmtdel' is a variable name that violates the naming convention. Word parts
are supposed to begin with upper-case letters, except for the very first
letter, which is lower case, hence, 'pStmtDel'. This is called "camel case",
often spelled "camelCase" to emphasize why.
What does the initial 'p' stand for? Variable names are supposed to be
meaningful, in the context of the problem domain.
> Please provide the full code snippet you are referring to. I see no "if"
> condition in the code snippet you provided, therefore it is impossible to
> find out what your problem is.
Also, OP, answer this, what is "swings"?
There is a GUI library in Java called "Swing". Perhaps that's what you meant.

Signature
Lew