Re: another java question--method call not working when it should

  • From: Alex Hall <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Mon, 31 Mar 2008 23:36:48 -0400

Sorry about that. I tend to either give no information or go on and on. The program is a class project to demonstrate stacks and queues. It reads in files at the cmd line or, if none are passed, prompts for the file names. The files have just three characters per line: b (buy) or s (sell), number of items, and price per item. For example:

s 4 7
means sell 4 items at $7 a piece. I am to push or pop numbers depending on whether the letter is s or b in a stack, then nqueue and dqueue the same numbers in a queue and calculate how much was gain or lost in the transactions recorded in the file. I have already sent the method call and signature, but be advised that the method takes an array of Scanner objects, each element of which holds one file to be examined. I hesitate to post my entire code here.

Have a great day,
Alex

----- Original Message -----
From: "Marlon Brandão de Sousa" <splyt.lists@xxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Date sent: Tue, 1 Apr 2008 00:19:20 -0300
Subject: Re: another java question--method call not working when
it should

Hello Alex,
You keep acting the same way you did when you started to use the
list,
and I have to keep asking you the same procedures over and over
..  so
let me again repeat it: Can you please send the peace of code in
which
the error fired on, and can you remember to adopt this procedure
in
every programming questions you will for sure have in your
learning
process?
This would make things easier for us, because now you probably
would
have more people looking at your code and trying to see what
might be
going on with it.
To show you an example, I am not a java programmer in a daily
basis,
but my feeling based on what you described is that there's a
syntax
error somewere which is making the compiler confused. If your
code
peace was pasted I would check it and say you what was wrong, or
get
quiet if I couldn't see anything strange, instead of writting
this
long response that, after all, doesn't help neither you, nor
other
folks and nor me.
Please see this as a suggestion, not as a flame, cinse I am
writting
this to both help you to post more complete questions in lists
and get
faster and more efective responses and us to help you in your
issues
with stuff related to programming things.
Thanks
Marlon

2008/3/31, Alex Hall <mehgcap@xxxxxxx>:
Hi all.  I have a method with return type void, but when I call
it it says "invalid method declaration; return type required".
Then, for the same line, it says "<identifier> expected".
Again,
the method in question is VOID, meaning no return type.  Even
when I toss in a return statement, returning an int from the
method in question, it gives me the same errors.  Also, is there
an easier way to review the list of compiler errors in EdSharp
than recompiling and listening to them all over again? Thanks.

Have a great day,
Alex
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind




--
When you say "I wrote a program that crashed Windows," people
just
stare at you blankly and say "Hey, I got those with the system,
for
free."
Linus Torvalds
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: