Re: ERROR: exceded the 65,535 byte limit
On 11/14/2010 10:55 AM, Spirit wrote:
[...]
public class MainApplication extends WebApplication {
private List<C> cheeses = new ArrayList<C>();
cheeses.add (new
C("BBTAA","001","","","","","","","","","","Portafotografia
argento","","","","","","","","","19.00","","","1000","ard","verif","","","","","","0"));
The last line (cheeses.add(...), give me this errors:
Multiple markers at this line
- Syntax error on token "add", = expected after this token
- Syntax error on token(s), misplaced construct(s)
Please Help me!
Executable statements like "cheeses.add(...);" must exist inside
a method or constructor or initialization block. They cannot simply
float around at the top level of your class.
A few other points:
You may have already noticed that thirty-two parameters for a
method or constructor is an unwieldy number, too many for a human to
keep track of. This is particularly true when fully two-thirds of
the corresponding arguments are empty place-holders! This sort of
thing is fine for a spreadsheet or database or other arrangement of
data in fixed columns, but it is an error-prone style for source code.
Consider ways to reduce the parameter count -- for example, could the
ten parameters cat1,...,cat10 be aggregated into a single array?
If you have a spreadsheet or something that holds the information
about all these cheeses, a better approach would be to read from the
spreadsheet itself. This may be beyond your skill at the moment, but
it is what "real" programs nearly always do. Until you have learned
enough to handle the reading, don't try to use "real-scale" data sets;
you will just get yourself into amazing amounts of simple trouble.
--
Eric Sosman
esosman@ieee-dot-org.invalid