Re: Translate attempt
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Mon, 30 Jun 2008 08:01:42 -0400
francan00@xxxxxxxxx wrote:
String $inf [];
RedGrittyBrick wrote:
Unless this is some variant of Java I am unfamiliar with, variable names should not be prefixed with a dollar sign.
They should not be, but it's legal, strictly speaking.
<http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.8>
The Java letters include uppercase and lowercase ASCII Latin letters A-Z (\u0041-\u005a), and a-z (\u0061-\u007a), and, for historical reasons, the ASCII underscore (_, or \u005f) and dollar sign ($, or \u0024). The $ character should be used only in mechanically generated source code or, rarely, to access preexisting names on legacy systems.
Nevertheless, francan00, you should follow RGB's advice and eschew dollar signs in your Java identifiers. It may only say "should", but that's pretty close to "must" in this case.
francan00@xxxxxxxxx wrote:
if($inf.equals(getParameterValues($res)) {
RedGrittyBrick wrote:
and array elements should be indexed - e.g. if (inf[0].equals(...)) {
The method name 'getParameterValues()' implies return of an array or collection, so it is possible that the expression was meant to refer to the array as a whole.
With such tiny, incomplete fragments of code from the OP, one can only speculate, of course.
If that method does return an array, the OP may be surprised that 'equals()' between arrays doesn't do what they expect.
--
Lew
.
- References:
- Translate attempt
- From: francan00
- Re: Translate attempt
- From: RedGrittyBrick
- Translate attempt
- Prev by Date: Re: J2EE Weblogic Developer required for IBM partner at Kuwait
- Next by Date: Re: interface specification - jar or source files
- Previous by thread: Re: Translate attempt
- Next by thread: Re: Translate attempt
- Index(es):
Relevant Pages
|