More specifically, this is what's in your constructor:The stack trace gives the precise line in your code that starts down the path to the exception. One you have that line number, work backwards in your code.
The code is nearly unreadable because of the lack of proper indentation. Also, class names should begin with a capital letter.
posted 10 years ago
i initialized queArray variable
this time i don't get any errors but it does not get filled up so when i retrieve it is EMPTY
Bhathiya Pathirana wrote:i'm really sorry, it's just i'm a beginner but thank you very much for trying to help me out
i get no error but when i try to retrieve, it is empty
It's a similar error to your first one. You need to learn about the scope of instances of objects/variables.
Do you understand why that was wrong?
Can you see the conflict?
If I were you I would start with a simple example. You are using inheritance, a GUI, inner classes- all very advanced topics. Start off with a very simple example where you can enter your name and get it to return it back to you(System.out.print() will do fine!). After that get it to store a number of names and print them all back to you. Once you can do that you can start worrying about creating Person classes with name/email fields etc.
You mean that compiler error on line 11? But if you leave out the "private" on that line then your example is a good one of local variables shadowing / hiding instance fields.
Once I turned off my PC last night I felt that I had made that error! Updated.
posted 10 years ago
Thank you very much for you all guys being so supportive and kind about me, can anyone please let me have some hints for where i should start learning from? course names or training materials, so i can start having a good foundation..
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop