1

In my try catch :-

catch (SQLException ex) {
        Logger.getLogger(dataprocess.class.getName()).log(Level.SEVERE, null, ex);
    }

There is an error in dataprocess..It is underline..I got this code from internet and is there any library to import to re corrct this

1 Answer 1

1

You shouldn't really copy code from the Internet and chop it in to your program hoping it will work, unless you understand it.

Try changing dataprocess to the name of the class this code is in.

For example:

    public class MyClass { 
        public MyClass() { 
            try { 
               // Do sql stuff 
            } catch (SQLException ex) { 
               Logger.getLogger(MyClass.class.getName()).log(Level.SEVERE, null, ex);
            } 
        } 
    }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.