Got this error when compiled java code in ubuntu.
![Got this error][1]
error: illegal character: '\ufeff'
import java.net.*;
^
error: class, interface, or enum expected
import java.net.*;
^
As Jim Garrison pointed out, you probably have a Byte Order Marker (BOM) at the start of the file. Use an editor that can view all non-printable characters and remove it.
Alternatively, you can use sed to remove it:
sed '1s/^.//' infile >> outfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With