Java - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Java (676 Views)
1 Reply
| Java by HenryBios(op): 7:35am On Aug 17, 2010 |
import java.io.*; class FileRead { public static void main(String args[]) { try{ var iChars = "*|,\":<>[]{}`\';()@&$#%"; for (var i = 0; i < string.length; i++) { if (iChars.indexOf(string.charAt(i)) != -1){ System.out.println("Characters found" ;} catch (Exception e){ System.err.println("Error: " + e.getMessage()); } } } } Please let me know what is wrong with the above code. It is giving some compilation errors. I am trying to set an alert once I read the text file which contains special characters. Help!!!! |
| Re: Java by sayhi2ay(m): 5:27pm On Aug 17, 2010 |
why not post the error along with your code? for (var i = 0; i < string.length; i++) { var i < string.length of what ? |
Review This Site Please • Cheap Website Registration For Nigerians • I Will Design An Advert Banner For You @ N200 Per Client
;