Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > identifier excepted

Reply
Thread Tools

identifier excepted

 
 
minie minie is offline
Junior Member
Join Date: Jun 2008
Posts: 2
 
      06-27-2008
Code:
import java.util.ArrayList;
public class Livraria
    {
        
        private ArrayList<Artigo> artigos;
        
        public Livraria()
        {
            artigos = new ArrayList<Artigo>();
        }
        public void juntaArtigo( Artigo a) {
            artigos.add( a);
        }
        public void listarTudo() {
            double valorTotal = 0;
            for (Artigo a : artigos) {
                System.out.println( a);
                valorTotal += a.getValor();
            }
            System.out.println("Valor total dos artigos: "+valorTotal);
        }
        
        public void listarAutor( String aut) {
            for (Artigo a : artigos) {
                if (a instanceof Livro) {
                    Livro l = (Livro)a;
                    if (l.getAutor().equals( aut)) {
                        System.out.println( l);
                    }
                }
            }
        }
        public ArrayList<Artigo> listarTitulo( String tit) {
            ArrayList<Artigo> lista = new ArrayList<Artigo>();
            for (Artigo a : artigos) {
                if (a.getTitulo().equals( tit)) {
                    lista.add( a);
                }
            }
            return lista;
        }
    }
<identifier> expected
@private ArrayList<Artigo> artigos;

also since i havent found anything about it on the inet could u tell me why this happens? wats the meaning of it and when can it happen.

thank you
 

Last edited by minie; 06-27-2008 at 12:58 PM..
Reply With Quote
 
 
 
 
minie minie is offline
Junior Member
Join Date: Jun 2008
Posts: 2
 
      06-27-2008
just as i though...
JDK issue


- Closed -
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSD Error: "Expecting '.', identifier or quoted identifier withmultiple tables. S_K ASP .Net 0 08-06-2008 09:22 PM
How can I fix the warning C4786 'identifier' : identifier wastruncated to 'number' characters in the debug information...? babakandme@yahoo.com C++ 2 12-11-2007 08:17 PM
identifier not found error, undeclared identifier aarthi28@gmail.com C++ 2 02-26-2007 02:11 AM
filling an array excepted first and last position... Josselin Ruby 11 10-21-2006 10:17 AM
Trying to declare identifier locally and hide a file scope identifier Kobu C Programming 7 02-25-2005 05:19 AM



Advertisments