Answer the question
In order to leave comments, you need to log in
Why does it give an illegal start of expression error?
I don’t understand why it doesn’t run the code and gives an illegal start of expression error
package InputandOtput;
import java.io.*;
public class ReadBytes {
public static void main(String[] args){
throws IOException {
byte[] data = new byte[10];
System.out.println("Enter Symbol");
System.in.read(data);
System.out.println("You enter: ");
for (int i = 0; i < data.length; i++) {
System.out.print(data[i]);
}
}
}
}
Answer the question
In order to leave comments, you need to log in
public static void main(String[] args){ -- лишняя {
throws IOException {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question