[java programming] Re: Error: toString() in java.lang.Object cannot be applied to (Item[])

2009-07-25 Thread * ^ *
On Jul 26, 2:37 am, "* ^ *" wrote: > I get the above error. Relevant code fragment is included below: >     // An inner class. >     private class ListCommand{ >         public void process(Items items, Device device){ >             Item[] list=items.list(); >             // Error here. A call to

[java programming] Re: Error: toString() in java.lang.Object cannot be applied to (Item[])

2009-07-25 Thread user001
toString(Items[] list) is declared as private so it won't be accesible from outside the class; that includes nested ones. As your method isn't seen It thinks that you are trying to call java.lang.Object's toString() method wich takes no parameter. --~--~-~--~~~---~--~-

[java programming] Re: Error

2009-07-23 Thread pacior
Use try catch block - catching NumberFormatException - because String not containng integer is a something special here.I call it - "validation of input data". int ia = 0,ib = 0; try { ia = Integer.parseInt(a); ib = Integer.parseInt(b); } catch ( NumberFormatException e ){ System.out.println(

[java programming] Re: Error

2009-07-22 Thread african brewer
It would have been easy to help you if you gave the code that is throwing the error. However, i think you are trying to convert a variable into integer that cannot be converted, for example trying to convert "xyz" string to integer. Are you helped? --~--~-~--~~~---~--

[java programming] Re: Error

2009-07-22 Thread miga
On Jul 23, 8:10 am, ben wrote: > hi guys!!! > > i need help in fixing the following errors... > > Exception in thread "main" java.lang.NumberFormatException: For input > string: " " >         at java.lang.NumberFormatException.forInputString > (NumberFormatException.java:48) >         at java.l

[java programming] Re: Error in Netbeans?

2009-07-12 Thread Shawn Sampson
Thank you for assisting me with this!! This issue is caused by a package declaration error, Appearently Netbeans was delcaring the package somewhere, I was able to resolve it by double clicking on the error and selecting reconfigure. I beleive that declaring the package would be able to resolve

[java programming] Re: Error in Netbeans?

2009-07-11 Thread Andre Brown
Hi Shawn, I had the same error. I got rid of it by including a package statement, eg.: package myassignment; The first statement in a java file (excluding comments) should be the package declaration. However, the package declaration is optional AFAIK. So I'm not entirely sure why netbeans is c

[java programming] Re: Error message on Exersice 4.2 in Java beans

2009-06-04 Thread * ^ *
I detected some discrepancies. On Jun 4, 2:54 pm, John Joseph wrote: > Hi >   I am trying out the notes and sample programs in JavaBeans > in Event Handling section . > Exersice 4 : Event Handlinng (4.1) Add event handling using your own event > source Event handling with own event source is in

[java programming] Re: Error: Exception is never thrown in body of corresponding try statement

2009-02-12 Thread Harriat Teresa Damian
hi, The problem is that the code that you have written in the try block will never throw the checked exception that you are trying to handle in the catch statement.There is no point in handling IOException when you are writing code for data base connectivity. Warm Regards, Teresa. On Thu, Feb

[java programming] Re: Error: Exception is never thrown in body of corresponding try statement

2009-02-12 Thread Adam M. Dutko
That means you are attempting to catch something that is never going to be thrown and the compiler flagged it as a "removable" exception. So remove the offending exception and try again. If it's the only exception for the try block, remove the try block and the catch. -Adam On Thu, Feb 12, 2009

[java programming] Re: Error: Exception is never thrown in body of corresponding try statement

2009-02-12 Thread Katia Lage
Probably you put a code into a try/catch block, but there isn't any occasion (any statement into the try block) that the exception you really occur. On Thu, Feb 12, 2009 at 3:20 PM, miga wrote: > > If you give us a little more context, it will help us to help you. > > On Feb 12, 6:14 pm, vrkh...

[java programming] Re: Error: Exception is never thrown in body of corresponding try statement

2009-02-12 Thread miga
If you give us a little more context, it will help us to help you. On Feb 12, 6:14 pm, vrkh...@aim.com wrote: > I am getting this error while compiling my code, > > "Exception is never thrown in body of corresponding try statement" > > any idea how i can fix this. > > thanks --~--~-~--~--

[java programming] Re: Error while doing the labwork for Getting input from keyboard

2009-01-16 Thread ameethpalla
It should tell you what the errors are when you try to compile/build. See the window where you get the Build messages in Net Beans. cheers, Ameeth --- On Fri, 1/16/09, Srini Srinivasan wrote: From: Srini Srinivasan Subject: [java programming] Re: Error while doing the labwork for Getting input

[java programming] Re: Error while doing the labwork for Getting input from keyboard

2009-01-16 Thread Srini Srinivasan
Thanks Steffani, it worked. It's great to be in this group. Thanks, Srini. From: Steffani Trinitra Setyasari To: javaprogrammingwithpassion@googlegroups.com Sent: Friday, January 16, 2009 3:47:49 AM Subject: [java programming] Re: Error while doing the la

[java programming] Re: Error while doing the labwork for Getting input from keyboard

2009-01-16 Thread Srini Srinivasan
riday, January 16, 2009 4:49:43 AM Subject: [java programming] Re: Error while doing the labwork for Getting input from keyboard Hello Srini, >When I hit "Run Anyway", I get error: When you run a project, and it comes up with compile error; it's not a good idea to do "Ru

[java programming] Re: Error while doing the labwork for Getting input from keyboard

2009-01-16 Thread ameethpalla
Looks like you have an extra } at the end. Remove it and try compiling. Your program looks OK to me otherwise. cheers, Ameeth --- On Thu, 1/15/09, Srini S wrote: From: Srini S Subject: [java programming] Error while doing the labwork for Getting input from keyboard To: "Free Java Programming

[java programming] Re: Error while doing the labwork for Getting input from keyboard

2009-01-16 Thread greenbean
Hello Srini, >When I hit "Run Anyway", I get error: When you run a project, and it comes up with compile error; it's not a good idea to do "Run Anyway". Find out what the compile error is, then do the run. greenbean --~--~-~--~~~---~--~~ To post to this group,

[java programming] Re: Error while doing the labwork for Getting input from keyboard

2009-01-16 Thread Steffani Trinitra Setyasari
Hi, I think you made 2 mistakes : - you typed :    age=dateIn.readLine();   Not "dateln" but "dataln" -  too many "}"    You should remove one of the "}" Cheers! --- On Fri, 16/1/09, Srini S wrote: From: Srini S Subject: [java programming] Error while doing the labwork for Getting input fr

[java programming] Re: Error listenerStart - LAB-4005 - Servlet Advanced

2008-10-30 Thread Do Thanh Nga
Dear all, Thank you for your answers! I found problem and fix this. The way to fix is below: When using Web Application Listener Template, Netbeans generates code: public class MyOwnEventListener implements ServletContextListener { public void contextInitialized(ServletContextEvent s

[java programming] Re: Error on Exercise 2 under Inheritance

2008-09-22 Thread Richard
I've just noticed this too. The exercises are full of "contractor" instead of constructor... It confused me a little bit. Is this the result of an over-vigilant spell-checker? :-) On Sep 21, 3:19 pm, "Stephen Hunter" <[EMAIL PROTECTED]> wrote: > There is a error on Exercise 2 (Constructor cal

[java programming] Re: error in 1027 zip file, MyRewritingInterface

2008-09-07 Thread miga
On Sep 7, 10:11 pm, erik <[EMAIL PROTECTED]> wrote: > in Person.java, the constructor Person must be made public...true ? > but maybe somebody already mentioned that. Yes, you're right. But it is really better to build the exercices yourself, rather than relying on the samples. You'll learn more