Results 1 to 4 of 4
Thread: incompatible types error
- 06-02-2010, 04:00 PM #1
Member
- Join Date
- Jun 2010
- Posts
- 1
- Rep Power
- 0
incompatible types error
hi,
can anyone help me !!!
this is the java code:
// extract page title and links
Parser parser = new Parser(url.toString());
NodeList titleList = parser.parse(new NodeClassFilter (TitleTag.class));
String title = (titleList.size() != 0) ? ((TitleTag) titleList.elementAt(0)).getTitle() : "";
parser.reset();
NodeList list = parser.parse (new NodeClassFilter (LinkTag.class));
and the error is :
test.java:112: incompatible types
found : void
required: org.htmlparser.util.NodeList
NodeList titleList = parser.parse(new NodeClassFilter (TitleTag.class));
^
test.java:115: incompatible types
found : void
required: org.htmlparser.util.NodeList
NodeList list = parser.parse (new NodeClassFilter (LinkTag.class));
^
2 errors
please i need help it's most important.
thank
- 06-02-2010, 04:23 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,380
- Blog Entries
- 7
- Rep Power
- 17
- 06-02-2010, 04:26 PM #3
When all else fails read the API doc!
- 06-02-2010, 04:58 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,380
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
> Operator cannot be applied error and return incompatible types error
By corney_16 in forum New To JavaReplies: 1Last Post: 03-10-2010, 01:53 PM -
Incompatible operand types int and double[][]
By Haske2r in forum New To JavaReplies: 2Last Post: 01-21-2010, 05:26 PM -
Incompatible types
By coltragon in forum New To JavaReplies: 5Last Post: 01-15-2010, 04:47 PM -
Error: incompatible types, found: int required: boolean
By silvia in forum New To JavaReplies: 6Last Post: 10-08-2008, 08:09 AM -
problem with scanner class:incompatible types
By fred in forum New To JavaReplies: 1Last Post: 07-20-2007, 07:02 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks