Caracteres in a String

i want to create a String with the " caracteres how can i do:
Sting s = """+string2 ; don't work

escape the quote char with a backslash:
String quotechar = "\"";

Similar Messages

  • How can i convert some caracteres of a String in bold characteres?? hELPME

    How can i convert some caracteres of a String in bold caracteres?? hELPME
    I have a JList and a DefaultListModel of Strings. So, i have many key words like "proccess", "if", "fi" that i want these characteres in bold.

    How i can use HTML in java to change a String to bold?
    example
    String str = "channel ";
    str = <b>str</b>;
    like this? syntax error =/

  • Database toolkit stored procedure return String

    Hi all,
    How I can return the entire string from my stored procedure using the attached code ?
    With this code I only retrive the first caractere of the string return by the stored procedure.
    Thanks for your help.
    MHP

    It could be that there is something screwy with LV, but given that it uses standard interfaces for comm with the DBMS, I would not expect that. A much more realistic possibility is that the toolkit is mucking things up. (A fairly common occurrence.)
    Try bypassing the toolbox -- which you don't really need anyway -- an talk directly to the ActiveX or .net interface.
    Also, what DBMS? What drivers are you using?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • ASCII to decimal to ASCII

    Hi all,
    i have a question. This is what is like to build.
    i have a string value something like "abcd"
    now i like to convert the caracters in this string to a decimal value cracter by caracter, do a calculation and bring it back to a ASCII value
    like this:
    a = 097
    b = 098
    c = 099
    d = 100
    then
    097 - 4 = 093
    098 - 4 = 094
    099 - 4 = 095
    100 - 4 = 096
    then
    093 = ]
    094 = ^
    095 = _
    096 = `
    so the output of the program is not:
    abcd
    but it should be :
    ]^_`
    any thought how this should be done???
    Regards Johan

    You can read one-by-one character in your String, using the method char charAt (int position). For example, let's say your String is str. You can do like this:
    String str = "abcd";
    for (int cont = 0; cont < str.length (); cont += 1)
       System.out.print ("" + (str.charAt (cont) - 4) );If you want to have the decimal value of the character, you need to do a cast. For example:
    String str = "abcd";
    int i;
    i = (int) str.charAt (2);
    System.out.println ("" + i);In this case, it will display the ASCII value of 'c' (the character number 2 of str) on your standard output stream.
    Hope this helps.
    Antonielly.

  • Probleme caractere Echap dans un string

    Je n'arrive pas à envoyer ce message sur le forum de la comm. française...
    Bonjour à tous,
    Je rencontre (encore) un problème et j'aurais besoin d'un peu d'aide svp.
    J'utilise un compteur Heidenhain ND287 et n'ayant pas trouvé de driver pour l'utiliser, j'ai du créer mes propres fonctions. Celle permettant de demander la valeur mesurée pose soucis...
    Communication USB.
    J'envoi correctement la commande et réceptionne bien la réponse. Cependant, cette dernière comporte des "caractères" Echapp (visible comme un carré depuis un indicateur string) que je n'arrive pas à gérer. En effet, il peut y en avoir 2 ou 3 avant la valeur numérique et je dois isoler cette dernière correctement pour pouvoir être lue (sinon je lis 0).
    J'ai essayé diverses méthodes mais sans succès...  
    Quelqu'un aurait-il une idée?
    Solved!
    Go to Solution.
    Attachments:
    Untitled 1.vi ‏22 KB

    Bonjour,
    Merci pour le screenshot. Êtes vous sûr que le carractere renvoyé est bien "echap" avec le code 1B? Peut être regardez le code hexadecimal du string renvoyé et vévifiez que le premier caractère a bien le code 1B
    Pour ce faire, utilisez la fonction "string to byte array" de la palette Functions:: Programming::Numeric::Conversion ainsi que la fonction "number to hexadecimal string" de la palette Functions:: Programming:tring:tring/Number Conversion
    Si effectivement le "caractère mystère n'a pas pour code hexadecimal 0x1B, il est normal qu'il ne soit pas filtré.
    Cordialement
    Florian Abry
    Application Engineer Group Leader
    NI Germany

  • Problemas no recebimento de XML via E-mail caracteres especiais Valid ***.

    Boa  tarde
    Mestres
    Este problema descrito abaixo só acontece qnd recebo XML com caracteres especiais entre as tags  Enter, Tabs, Espaço....
    que representam 30% dos XML recebidos via E-MAIL
    Estou tendo problemas quando tenho a Assinatura Digital verificada pelo Serviço disponibilizado pelo Visual Administrador(Verify)
    Hoje recebo um XML por e-mail...resgato a string do XML no Kpro (GRC) e envio para esse serviço de Validação de Assinatura o mesmo Invalida a Assinatura
    Quando o mesmo é submetido ao validador do governo Programa Visualizado NF-e 3.5 e ao serviço SEFAZ RS http://www.sefaz.rs.gov.br/ASP/AAE_ROOT/NFE/SAT-WEB-NFE-VAL_1.asp  a assinatura é dada como Valida
    Bom ...o senhores devem estar se perguntando será que esse arquivo não esta sendo corrompido na transferencia do mesmo para o Kpro  ou no envio da msg para o serviço de validação de assinatura..., por esse motivo executei alguns ciclos de teste..:
    1 - Baixei o arquivo original para minha máquina e executei a validação usando o programa do governo
    Visualizador NFe 3.5 / serviço SEFAZ RS  -  Assinatura Válida
    2 - Executei a Interface  através do PI enviando uma MSG contendo a string do xml NFe resgatada no Kpro... para esse
    Serviço disponibilizado pelo Visual Administrador(SAP) as java  - Assinatura Invalida
    3 - Baixei o Payload da MSG da interface de Validação da ***. Digital pela transação SXI_MONITOR  Ajustei o xml editando em um bloco de notas (trocando os caracteres &lt;&gt; para maio e menor)
    Visualizador NFe 3.5 / serviço SEFAZ RS  -  Assinatura Válida
    4 - Criei um programa abap  ler a string do XML no Kpro (GRC)  e baixar ..local
    Visualizador NFe 3.5 / serviço SEFAZ RS  -  Assinatura Válida
    5 - Executei a Interface  através do PI enviando uma MSG contendo a string do xml ...local ..teste executado através da transação SPROXY
    - Assinatura Invalida
    em qual serviço estará o Problema?
    Alguém já enfrentou esse problema ou esta enfrentando?...pois esse  tipo de problema parece ser muito comum pois nem toda empresa tem SAP ....e o problema é que o SEFAZ aceita e valida esses XMLs...!
    pois estou pensando em seguir parte desta sugestão
    agradeço desde já ....!
    Edited by: Ronaldo de Moraes on Oct 21, 2009 3:05 AM

    Ronaldo,
    claramente há algum problema com a codificacao do arquivo.
    Abra o xml no Notepad e verifique que na tag Signature, há varias quebras de linha, incluindo caracteres nao reconhecidos (representados como um retangulo).
    Ainda, como vc está testando o servico verify?
    Vc fez uma interface XI? Porque não há interface PI standard p/ o serviço verify.
    Ainda, como vc chamou essa interface? Pela tela de teste do Runtime Workbench?
    O próprio ctrl+c que vc dá no conteúdo pode estar corrompendo os dados.
    O fato de vc estar utilizando um browser para o teste poderia corroborar isso.
    Faça o seguinte teste:
    1. Através do XMLSpy, criar uma SOAP Request p/ a interface verify (menu SOAP -> Create New SOAP Request)
    2. a tag  Send SOAP Request). Aqui deu válida;
    4.2. abra o .xml que vc quer testar no notepad, copie a tag  Send SOAP Request). Aqui deu inválida.
    Ou seja, dependendo da maneira que vc trata o conteudo (aplicacao onde vc abre o .xml, ctrl+c etc) vai haver uma modificacao da codificacao.
    Nao vejo muita maneira de garantir que funcione sempre a nao ser removendo esses caracteres, conforme definido pela propria SEFAZ.
    Att,
    Henrique.

  • Problems with string codification under unix

    Hi people,
    I'm trying to insert Latin caracters as � or � in a string, and trying to insert them into an excel page. Everything goes fine, untl those latin caracters are inserted. They are shown as a question mark (?). I tryed using a charset set to UTF-16 and ISO-8859-1, which is the ISO Latin Alphabet No. 1. But it still is shown as '?'.
    I think the problem might be in the unix codification.
    But have no idea really.
    Any help please?
    Thanks to everyone for your help.

    No, the original post mentioned Excel. That's a Microsoft product so it's unreasonable to expect it to understand ISO-8859 encodings. A Windows encoding would have a better chance of working.

  • How to add exactly 2 NON XML caracters at the end of a SOAP body

    Hello all I am trying to add two (and only two) extra non xml caracters "AA" at the END of a SOAP body using the JAXWS handlers as so:
    HTTP/1.1 200 OK
    Content-Type: text/xml;charset=UTF-8
    Content-Length: 131
    Content-Length: 131
    Server: Jetty(7.x.y-SNAPSHOT)
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body></SOAP-ENV:Body></SOAP-ENV:Envelope>
    AA
    The problem is that if you try to add them to the SOAP body (see code below) you get a XML Unmarshalling exception. If I add "AA" as a soap attachment I get MORE than 2 caracters after the SOAP body (which I don't want)
    Here is the my SOAPHandler code :
    @Override
    public boolean handleMessage(SOAPMessageContext mc) {
    if (Boolean.TRUE.equals(mc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY))) {
    try {
    SOAPMessage message = context.getMessage()
    String stringSoapMessage= getMsgAsString(message);
    stringSoapMessage += "ss";
    message.getSOAPPart().setContent((Source) new StreamSource(new ByteArrayInputStream(msg.getBytes())));
    message.saveChanges();
    context.setMessage(message);
    } catch (Exception e1) {
    return true;
    public String getMsgAsString(SOAPMessage message) throws SOAPException {
    String msg = null;
    try {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    message.writeTo(baos);
    msg = baos.toString();
    } catch (Exception e) {
    e.printStackTrace();
    return msg;
    so my question is this: is there any way to add exactly 2 non xml caracters at the end of the soap body using jaxws handlers ? I have spent several weeks on this so it is not an easy question...
    Thanks,
    Fred.

    Yes I have done it using CFX interceptors. But the runtime dependencies needed were too big for this particular use. I mean having to use these:
    apache/cxf/cxf-bundle/2.6.0/cxf-bundle-2.6.0.jar
    org/apache/neethi/neethi/3.0.2/neethi-3.0.2.jar                    
    wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
    /org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar
    org/apache/ws/xmlschema/xmlschema-core/2.0.2/xmlschema-core-2.0.2.jar
    org/mortbay/jetty/jetty-util/6.0.2/jetty-util-6.0.2.jar
    org/eclipse/jetty/jetty-util/7.5.4.v20111024/jetty-util-7.5.4.v20111024.jar
    org/apache/geronimo/specs/geronimo-servlet_2.5_spec/1.1.2/geronimo-servlet_2.5_spec-1.1.2.jar
    org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
    org/apache/geronimo/specs/geronimo-servlet_3.0_spec/1.0/geronimo-servlet_3.0_spec-1.0.jar
    org/eclipse/jetty/jetty-http/7.5.4.v20111024/jetty-http-7.5.4.v20111024.jar
    org/eclipse/jetty/jetty-server/7.5.4.v20111024/jetty-server-7.5.4.v20111024.jar
    org/eclipse/jetty/jetty-io/7.5.4.v20111024/jetty-io-7.5.4.v20111024.jar
    org/eclipse/jetty/jetty-continuation/7.5.4.v20111024/jetty-continuation-7.5.4.v20111024.jar
    to add two caracters at the end of a soap message seems like over kill. If this is the only way to do this then i'll do it this way but it just seems like the implementation of the JAXWS API in JDK 6 seems inches away from being able to do this no ?
    Thanks for the replies,
    Fred

  • ERROR USING HTML textarea with Java String

    I have a form in HTML that has a textarea for input messages.
    When user press submit, a java servlet gets the information and stores it in a Database as a String.
    Later, I have a JSP thata retrieves that information from the database and put it as the value propertie of another textarea in the page so user can modify it if wanted, but I am having a hard time finding how to do so , because when I do the line:
    <textarea .....bla bla.... value=
    <%=some_string%>
    .....bla >
    and the some_string has more than one line ( e.g "\n" or "\r" caracteres ), I got an error when displaying the page. Can anyone help me with that please ???
    Thanks.

    here's my codes again for reference. hope it helps to rectify the matter
    // edit.jsp
    String search = (String)request.getParameter("txtSearch");
    String parameter = (String)"%"+search+"%";
    String sSQL = "select * from tblArticle where Title LIKE '"+parameter+"'";
    <%
    try {
    while(Rs.next()) {
    %>
    <tr>
    <td width="16%" height="157" align="center">Article:</td>
    <td width="88%" height="157"><textarea rows="15" name="txtArt" cols="86" value="<%= txtArt %>"></textarea></td>
    </tr>
    </table>
    <%
    // .....

  • In Range and Coerce, STRING

    Hola a todo el mundo,
    La funcion "In Range and Coerce" para cadenas de caracteres, tiene un comportamiento que no acabo de entender.
    Si mi limite superior es z y mi limite inferior es a, si pongo d obtengo un PASS. Hasta aquí todo correcto.
    ¿Por qué obtengo también un PASS si pongo d seguido de cualquier texto? ¿Como es posible que solo evalue el primer digito?
    Es decir: "alaglhzafgkhjzs" esta dentro de "a" y "z"??         ......      al parecer la respuesta es sí.
    Con imagenes:
    Muchas gracias por todo

    Hola de nuevo,
    He hecho un vi que realiza lo que esperaba encontrarme. Lo dejo en Labview 8.5 por si a alguien le ha sucedido lo mismo.
    Gracias
    Adjuntos:
    In Range String.vi ‏14 KB

  • I have Problems to type some ASCII caracteres who

    When i run an applet.....
    I have Problems to type some ASCII caracteres who "@", etc..
    When hay type alt+64 "@" or alt+92 "\"....
    how i can to resolve this problem...
    My keyboard is in spanish.......
    Thanks in advance...
    Regards
    Mario Durand S.
    [email protected]

    try
    java.lang.String[] getParameterValues(java.lang.String name) which is a method from ServletRequest interface. You can use this with a for loop.
    String[] arrayParameter = request.getParameterValues("ParameterName");

  • SendMail: can not send mail with body more than 1000 caracters

    Hi,
    I can not send mail with a body wich is more than 1000 caracters.
    FUNCTION SendMail(SMTPServerName IN STRING,                     
                        Sender IN STRING,                     
                        Recipient IN STRING,                     
                        CcRecipient IN STRING,                     
                        BccRecipient IN STRING,                     
                        Subject IN STRING,                     
                        Body IN STRING,                     
                        ErrorMessage OUT STRING,                     
                        Attachments IN ATTACHMENTS_LIST) RETURN NUMBER IS      
                        AttachmentList VARCHAR2(4000) := '';      
                        AttachmentTypeList VARCHAR2(2000) := '';   
                          BEGIN       ParseAttachment(Attachments,                      
                                                      AttachmentList);      
                                      RETURN JSendMail(SMTPServerName,
                                                       Sender,                       
                                                       Recipient,                       
                                                       CcRecipient,                       
                                                       BccRecipient,                       
                                                       Subject,                       
                                                       Body,                       
                                                       ErrorMessage,                       
                                                       AttachmentList); 

    Hi,
    I can not send mail with a body wich is more than 1000 caracters.
    FUNCTION SendMail(SMTPServerName IN STRING,                     
                        Sender IN STRING,                     
                        Recipient IN STRING,                     
                        CcRecipient IN STRING,                     
                        BccRecipient IN STRING,                     
                        Subject IN STRING,                     
                        Body IN STRING,                     
                        ErrorMessage OUT STRING,                     
                        Attachments IN ATTACHMENTS_LIST) RETURN NUMBER IS      
                        AttachmentList VARCHAR2(4000) := '';      
                        AttachmentTypeList VARCHAR2(2000) := '';   
                          BEGIN       ParseAttachment(Attachments,                      
                                                      AttachmentList);      
                                      RETURN JSendMail(SMTPServerName,
                                                       Sender,                       
                                                       Recipient,                       
                                                       CcRecipient,                       
                                                       BccRecipient,                       
                                                       Subject,                       
                                                       Body,                       
                                                       ErrorMessage,                       
                                                       AttachmentList); 

  • JTable How many caracters can be inserted in a Cell ?

    Hi all,
    how many caracters can be inserted in a Cell of a Table?
    Thanks Konny

    hi,
    i think, that you can fill so many characters as a String can hold ( infinity or as long as your memory can )

  • Read source XML as a string in expression editor

    Hi all,
    Is there any way to read an entire container objects source (an XML message) in an integration process as a string using an xpath expression in the expression editor?
    I would like to pass the source XML of a container object as a string into an import parameter in a mapping.
    I have solved for now by creating a separate mapping for each type of message. But I have many message types and would like to have just one mapping if possible, where at runtime I can pass a different message source.
    I have looked for an xpath function that will return the XML source of a node but no luck.
    I have seen the "use sap XML toolkit" checkbox on an operation mapping. Does this have any feature that would help?
    Or, is there any way to pass a different source message schema into a mapping at runtime?
    Thanks all,
    RBL

    Hi.
    I have a similar problem:
    In the Expression Editor, my structure looks like this:
    procNfe (element/type:procNfe)
       CNPJRec (element/type: string)
       procNFeStr (element/type: string)
    I need to compare if the first 3 caracters in the infNFe-Id is iqual to NFe.
    The following XPath Expression does not consider any TAG (anywhere I put X-outside any tag, it works. Therefore I need to search inside <infNfe....id="HERE">
    XPath Expression:
    /p1:procNFe[substring(p1:procNFeStr, 1, 1) = "X"]
    Payload:
    <n0:procNFe xmlns:n0="http://sap.com/xi/NFE/common"......>
      <n0:CNPJRec>17469701009980</n0:CNPJRec>
      <n0:procNFeStr><?xml version="1.0" encoding="UTF-8"?><nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="1.10"><NFe xmlns="http://www.portalfiscal.inf.br/nfe"><infNFe versao="1.10" Id="NFe35100217469701004911550010000000860089724956"><ide>...............
    Any sugestions?

  • Fault in string comparisons?

    Hallo.
    I have the following problem. An XML file, encoded in ISO8859-2, should be presented in a table in a browser's window. The file is "one level deep", something like:
    <type>animal</type>
    <name>cat</name>
    <type>insect</type>
    <name>ant</name> ...and so on.
    The resulted table should be (its heading in bold):
    TYPE NAME
    animal cat
    insect ant
    I process the file using methods from 'org.w3c.dom.*' package and store all the strings (having polish national characters) in a table. The table is displayed correctly.
    Besides presentation of everything, the user should be able to select only certain rows from the table. To do this, he has input boxes (as many as the colums in the table) and can enter strings into them. These strings serve as filters. For example, after entering 'animal' in the first box only the first row of the table above should be displayed.
    Again, everything works fine, but only if the string entered doesn't contain polish characters. If it does - no one row is displayed.
    The application is made as a servlet with the XML file stored in the same server.The strings entered in the input boxes are displayed correctly (with polish characters). The caracters seem to be properly encoded (first the browser is set to use ISO8859-2, and, second, I see their values in the browser's address window when they are sent using GET). I tried PUT too - in vain.
    The polish characters in the test XML file were checked in hex editor and are surely encoded in ISO8859-2. The encoded type is declared in the files' header.
    So my questions are:
    1/ What is wrong?
    2/ What to do to correct it?
    Any suggestion(s) are highly appreciated.
    With many thanks in advance,
    L. Pankowski
    ([email protected])

    Sorry once more! Maybe the following version will be better?
    (By the way: Is it possible to remove improperly posted messages from the thread?)
    Regards,
    L.P.
    //from doGet method; doPost is the same as doGet
       DocumentBuilder builder;
       File f = new File("C:/servlets/test2.xml");
       try
          DocumentBuilderFactory factory
             = DocumentBuilderFactory.newInstance();
           factory.setValidating(true);
           factory.setIgnoringElementContentWhitespace(true);
          builder = factory.newDocumentBuilder();
    //Parse the content of the file as an XML document
    // and return a new DOM Document object..
       Document doc = builder.parse(f);
       Element root = doc.getDocumentElement();
       NodeList children = root.getChildNodes();
       int elementsNr = children.getLength();
    //Getting column names. Get the first one
    //and proceed until you find an identical one.
    //(there will be no more than 30 columns)
       String[] colNames = new String[30];
       Node first = children.item(0);
         Element firstElement = (Element)first;
         String firstColName = firstElement.getTagName();
         colNames[0] = firstColName;
         int n = 1;
         Node next = children.item(i);
         Element nextElement = (Element)next;
         String nextName = nextElement.getTagName();
         while (nextName != firstColName)
             colNames[n] = nextName;
             n++;
             next = children.item(i);
             nextElement = (Element)next;
             nextName = nextElement.getTagName();
          columnsNr = i;
          rowsNr = (int)elementsNr/columnsNr;
    //Array to put the strings that will be displayed
    // in the browser's table
          cells = new String[rowsNr][columnsNr];
    //Filling the array..
          for (n = 0; n <rowsNr ; n++)
             for (j = 0 ; j <columnsNr; j++)
                Node child = children.item(j+ n*columnsNr);
                Element childElement = (Element)child;
                Text textNode = (Text)childElement.getFirstChild();
                String text = textNode.getData().trim();
                cells[n][j] = text;
    //The content sent to the browser..
       response.setContentType("text/html; charset=iso-8859-2");
       PrintWriter out = response.getWriter();
       String title = "Library";
       out.println("<FORM method=\"POST\">");
       String napis = "To select certain rows fill in the fields and press" +
                            "<input type=\"submit\" value=\"Send\">";
       out.println(ServletUtilities.headWithTitle(title) +
                    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                    "<H5>" + napis + "</H5>\n");
       out.println("<H5>Empty field means don't care. To clear all the fields press <input type=\"reset\" value=\"Clear\"></H5>");
    //Getting elements of the filter..
    //The array to store elements of the filter sent from the browser
       String[] filterFields = new String[columnsNr];
    //Empty string means: don't check
       for (n = 0; n <columnsNr; n++)
          filterFields[n] = "";
       Enumeration sent = request.getParameterNames();
    //Not null fields' counter -
    // used to speed up the search of the matching rows (below)        
          k = 0;
       while (sent.hasMoreElements())
          String fieldName = (String)sent.nextElement();
          String fieldValue = request.getParameter(fieldName);
          if (fieldValue.length() > 0)
             n = 0;
             while (!fieldName.equals(colNames[n]))
             n++;
             filterFields[n] = fieldValue;
             k++;
    //Preparing and sending input fields of the filter..
       String filterBoxes = "";
    //Attempts to adjust the lengths of filter fields
    // to the resolution of the screen
       String dl = "size=\"" + (int)100/columnsNr + "%\"";
       for (n = 0; n <columnsNr; n++)
          filterBoxes = filterBoxes + "<input name=\"" + colNames[n] + "\"" + dl + "value=\"\">";
       filterBoxes = filterBoxes + "<BR>";
       out.println(filterBoxes);     
       out.println("</form>");
    //Forming and sending table header..
       String tableHeader = "";
       for (n = 0; n <columnsNr; n++)
          tableHeader = tableHeader + "<TH STYLE=\"width:1%;\">" + colNames[n];
       tableHeader = tableHeader + "</TH>";
       out.println("<TABLE BORDER=1>\n" + "<TR BGCOLOR=\"#FFAD00\">\n" + tableHeader);
    //Searching table rows matching the filter fields
    // and sending them to the browser..
    //n - row o the table being processed; j - column
       for (n = 0; n <rowsNr ; n++)
          j = 0;
          String row = "<TR>";
          boolean matches = true;
          int KCopy = k;
          while ((KCopy > 0) && matches)
          if (filterFields[j] == "")
             row = row + "<TD>" + cells[n][j];
             j++;
    //THIS IS WHERE THE STRING COMPARISON TAKES PLACE     
          else if ((filterFields[j]).equals(cells[n][j]))
               row = row + "<TD>" + cells[n][j];
               j++;
               KCopy--;
               else matches = false;
          if (matches)
             while (j < columnsNr)
              row = row + "<TD>" + cells[n][j];
              j++;
             out.println(row);
          out.println("<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
               "<TR BGCOLOR=\"#FFAD00\">\n" + "</BODY></HTML>");
    }

Maybe you are looking for