Below
statement returns the path to system desktop.
System.getProperty("user.home")
+ File.separator + "Desktop";
App.java
package com.sample.app; import java.io.File; public class App { public static void main(String args[]) { String desktopPath = System.getProperty("user.home") + File.separator + "Desktop"; System.out.print(desktopPath); } }
You may
like
No comments:
Post a Comment