Archive for the ‘java’ Category

PHP arrays comparision to Javascript and Java

Associative arrays in PHP = Javascript Objects written as name value pairs = Hash maps in Java

Java keeping config values in property file

1. File Simple.java import java.io.FileInputStream; import java.util.Properties; import java.io.IOException; import java.io.FileNotFoundException;   class Simple {   public static void main(String[] args) {   try {   Properties config = new Properties();   String configFile = "config.properties"; FileInputStream input = new FileInputStream("config.properties");   config.load(input);   String valueStr = config.getProperty("textlocal_key"); System.out.println(valueStr);   } catch (FileNotFoundException e) { […]

Java Convert Integer to String

String.valueOf(Integer);