Linked List program

  • Thread starter DeAndrea Monroe
  • Start date
D

DeAndrea Monroe

Operating on the assumption that you created a new Java project, namely a
Java application, and ended up with a Main class in some package that
NetBeans gave you, then added your classes to that package, simply delete
the Main class in the Project view. For running from the IDE you can right
click on your project in Project view, choose Properties > Run, and set
PhoneDir as your main class.

Thanks, that worked.
 
D

DeAndrea Monroe

He told us to use the library so I'm assuming that I don't have to
use
nodes. There is an updated version of the program on the same link.

I'm still recieveing a few errors like:
cannot find symbol for equalsIgnoreCase
illegal start of expression
cannot find symbol for method set and curr
 
A

Arved Sandstrom

DeAndrea said:
He told us to use the library so I'm assuming that I don't have to use
nodes.

The nodes would be internal to the JDK linked list implementation; if that's
what he said then you're cool.
There is an updated version of the program on the same link.
I'm still recieveing a few errors like:
cannot find symbol for equalsIgnoreCase
illegal start of expression
cannot find symbol for method set and curr

This I won't help with too much; in order to learn Java you should be
debugging these kinds of problems. I made mention of the incorrect methods
signatures problem earlier, and one of them was "equalsIgnoreCase". Learn to
use the Javadocs - those are your best friend. If you're in an IDE like
NetBeans or Eclipse or IntelliJ IDEA then you'll have Javadocs right at your
fingertips; for example, if a method name is selected in NetBeans a
Ctrl-Shift-Space (in Windows) will show you the correct way to use it.

As for "illegal start of expression", look at the line number of the
reported problem. This is often (not always) helpful. This error is often
caused by a typo, a stray or missing ';' or '}' kind of thing.

For "cannot find symbol", either the methods don't exist (remember in Java
case is significant) or they are not in scope.

AHS
 
D

DeAndrea Monroe

This I won't help with too much; in order to learn Java you should be
debugging these kinds of problems. I made mention of the incorrect methods
signatures problem earlier, and one of them was "equalsIgnoreCase". Learn to
use the Javadocs - those are your best friend. If you're in an IDE like
NetBeans or Eclipse or IntelliJ IDEA then you'll have Javadocs right at your
fingertips; for example, if a method name is selected in NetBeans a
Ctrl-Shift-Space (in Windows) will show you the correct way to use it.

The Javadocs aren't working. I don't know if their enabled or not.
As for "illegal start of expression", look at the line number of the
reported problem. This is often (not always) helpful. This error is often
caused by a typo, a stray or missing ';' or '}' kind of thing.

For "cannot find symbol", either the methods don't exist (remember in Java
case is significant) or they are not in scope.

I'm trying to figure out what's wrong with the errors but nothing I'm
doing is working. I'm looking for answers online but those tips aren't
working either.
 
M

markspace

The Javadocs aren't working. I don't know if their enabled or not.


Java docs aren't enabled by default in NB. You have to download the
docs from Sun, and then install them in NB. Check the NB help.

In the meantime, use Google.

Hint: when the IDE says "cannot find symbol for <method>", you almost
always have given it the wrong type of parameter.
 
D

DeAndrea Monroe

Hint: when the IDE says "cannot find symbol for <method>", you almost
always have given it the wrong type of parameter.

Now I'm getting an error for readLine for a String. I added it to the
package but it's still not working.
 
A

Arved Sandstrom

markspace said:
Java docs aren't enabled by default in NB. You have to download the
docs from Sun, and then install them in NB. Check the NB help.

Which is why I offered my Ctrl-Shift-Space suggestion. In NetBeans 6.9 on
one Windows VM that I was using as a reference, when highlighting a method
and right-clicking, the Alt-F1 (Show Javadoc) behaves exactly as you said.
However Source > Show Documentation (Ctrl-Shift Space) works just fine. Go
figure.

In any case:
http://javadude.wordpress.com/2009/05/08/how-to-add-javadoc-to-netbeans/
In the meantime, use Google.

Agreed. For almost any Javadoc a simple "Java X" as the keywords in Google
sifts out the cruft from other programming languages and locates the
appropriate API page. It doesn't hurt to throw "1.6" in as a keyword
also...otherwise 1.4 seems to show up as first choice the most.
Hint: when the IDE says "cannot find symbol for <method>", you almost
always have given it the wrong type of parameter.

That's likely true for a more seasoned Java programmer. I'm casting the net
a bit more widely here when offering suggestions. :)

AHS
 
M

markspace

Now I'm getting an error for readLine for a String. I added it to the
package but it's still not working.


Yeah, I looked. You're just writing code at random now. You need to
talk to you instructor or the assistants in the computer lab, there's
some education that needs to happen on their end. Right now, we're in
the mode of doing your homework for you because you aren't making enough
effort on your own.

What you need to do, besides talk to folks at your university, is learn
hand execution. This means you write out the steps that your computer
is doing on a piece of paper and then you "execute" them by calculating
the results yourself, just like you would for a math problem. You won't
learn how to program until you can do it yourself, and hand execution is
one of the best ways to learn
 
T

Thufir Hawat

This is odd to me. When I attended college, we had several labs, all
with posted hours (granted, few were open all day, esp. on Sunday). All
labs were walk-in: no appointment, you just wandered in the door.

It might be a college, my school is like this -- there aren't office
hours or stuff like that.


-Thufir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top