6

When I use this code at my home PC, it gives the output as "output1" ,But when i use the same code at my office PC gives a different output as "output2".

code:

System.out.println(System.getProperty("java.io.tmpdir"));
  • Output 1: C:\Users\admin\AppData\Local\Temp\

  • Output 2: C:\Users\admin\AppData\Local\Temp

    Why there is a difference in output?

Community
  • 1
  • 1
Kanak Shukla
  • 229
  • 1
  • 4
  • 11

1 Answers1

2

These outputs which the java gives from executing System.out.println(System.getProperty("java.io.tmpdir"));
is taken from the TMP environment variable set in the system...

Check there...

There will be a difference in the path for environment variable set there.

CoderNeji
  • 2,056
  • 3
  • 20
  • 31