Created
December 22, 2021 00:44
-
-
Save jonasermert/c6b67b858ee5c06b5f6980f59cdd7b25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream; | |
import java.util.Properties; | |
public class ReadPropertiesFile { | |
public static void main(String[] args) { | |
FileInputStream fis = new FileInputStream("Path to file"); | |
Properties prop = new Properties(); | |
prop.load(fis); | |
String uName = prop.getProperty("username"); | |
String uPassword = prop.getProperty("password"); | |
System.out.println(uName); | |
System.out.println(uPassword); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment