Sample code:
import java.io.*;
public class TestScope
public static void main(String args[]) {
int 10, 0;
Sor (11;120++) {
sint j*2;
System.out.println();
for (int mirm<10;m++) {
System.out.println(m);
System.out.println("Value is **
Question: Which line in the sample code above contains the compile-time error?
Answers
Answered by
0
Explanation:
- error statement- Write Statment
- Sor (11;120++) ....... for(conditions)
- int j*2; ......... int j*2
- for (int mirm<10;m++) .....for (int m=0;m<10;m++)
- System.out.println("Value is**
Answered by
0
Answer:
The program provided in the question is a java program and there are multiple compile time error in the program. First error is name of any identifier cannot be a number alone, which is found in the line number 4. Next error is found in line number 5, where Sor is written and the third error is in line number 6 which, this also consists of sint.
Explanation:
There are three type of errors that can happen in a java program, thy are 1) Run time error, 2) Compile time and 3) Logical error.
Similar questions