I can’t understand why this error is coming
class Temp extends java.awt.Frame
{
Frame f = new Frame(); // error is coming in this line
// code//
}
I know this is silly one but can’t getting reason
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know why you’re creating a Frame if you’re extending Frame. But in any case, are you importing java.awt.* or java.awt.Frame?