Hi Peeter,

I think the values of myname1 and myname2 are actually used (the "get" 
methods).

When you split on two lines the warning is gone because nameeq is no 
longer private, so, as package restricted (the default visibility) it 
might be read by some other class in the package. In the previous case, 
as private, NetBeans was certain that the value is never read.

Hope it helps
mihai



peeter brunch a écrit :
> Hi Alin & Mihai,
>  
> I only wonder why the other names such as myname1 and myname2 are 
> exactly being used in the way similar to nameeq, but these two 
> variables do not have any warning.
>  
> Afterall, I declare nameeq on a new line rather than on the same line 
> as myname1. It turns out the warning message has gone and error free.
>  
> private String myname1, myname2;
> String nameeq;
>  
> Regards,
> Peeter
>
>  
> ------------------------------------------------------------------------
> From: dorud...@gmail.com
> To: peeterbru...@hotmail.com
> Subject: RE: [java ee programming] MyHellowWeb variable definition 
> conflict
> Date: Fri, 16 Oct 2009 08:35:17 -0400
>
> Field nameeq is not used = it is not being initialized( the value that 
> YOU give to “nameeq” is in a return).
>
> The NetBeans IDE thinks it is not used because you use it in a method. 
> It should compile and run, the code is perfectly legal.
>
> I tried exactly what you did got the same error and then correct it 
> and got the warning, but it is legal and works.
>
> Alin
>
>  
>
> *From:* java-ee-j2ee-programming-with-passion@googlegroups.com 
> [mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] *On 
> Behalf Of *peeter brunch
> *Sent:* October-16-09 4:10 AM
> *To:* j2ee passion
> *Subject:* [java ee programming] MyHellowWeb variable definition conflict
>
>  
>
> Hello,
>  
> Can someone tell me what's wrong with the coding that cause the 
> "missing variable definition" in the program attached?
>  
> I am using Netbean IDE 6.7.1 on Vista for my developement.
>  
> Thanks you.
>  
> Regards,
> Peeter 
>
> ------------------------------------------------------------------------
>
> Hotmail: Trusted email with powerful SPAM protection. Sign up now. 
> <http://clk.atdmt.com/GBL/go/177141665/direct/01/>
>
>  
>
>
> ------------------------------------------------------------------------
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up 
> now. <http://clk.atdmt.com/GBL/go/171222985/direct/01/>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to