in java Write the output: int n=109584; int f=n%1000; int l=n/1000; System.out.println(f+"" ""+l);
Answers
Answered by
2
Answer:
- int n=109584;
- int f=n%1000;
- int l=n/1000;
- System.out.println(f+"" ""+l);
There will be a syntax error like cannot find symbol in line 4
What is the error?
- System.out.println(f+"" ""+l);
The error is here ^^^
- You are using double quotes but when you close them, the compiler thinks that the statement is over and thus it shows syntax error
How to remove this error?
- Use escape sequence ... \"
- It is used to print the double quote in the output screen.
Corrected Códe:-
int n=109584;
int f=n%1000;
int l=n/1000;
System.out.println(f+"\" \""+l);
Similar questions