Erreur "Unresolved compilation problem"
Bonjour,
Mon programme ne compile pas.
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| import java.io.*;
public class Randomaccess
{
public static void main (String[]args)
{
RandomAccessFile file;
try
{
file=new RandomAccessFile("city.txt","rw");
file.seek(file.length());
//file=writeString("MUMBAI/n");
file=writeBytes("MUMBAI/n");
file.close();
}
catch(IOException e)
{
System.out.println(e);
}
}
} |
j'ai erreur suivante :
Citation:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method writeBytes(String) is undefined for the type Randomaccess
at Randomaccess.main(Randomaccess.java:13)
Quelqu'un saurait-il m'indiquer d'où peut venir le problème ?
Merci d'avance pour votre aide.