Computer Science, asked by kshitijkshitija5642, 1 month ago

in java Write the output: int n=109584; int f=n%1000; int l=n/1000; System.out.println(f+"" ""+l);

Answers

Answered by BrainlyProgrammer
2

Answer:

  1. int n=109584;
  2. int f=n%1000;
  3. int l=n/1000;
  4. 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