Saturday, 15 September 2012

Replace special character with double quotes

public class Sample {
    public static void main(String[] args) {
String test = "«myname»";
System.out.println(test);
System.out.println(test.replace("«", "\"").replace("»", "\""));
System.out.println();
    }

}
output:
«myname»
"myname"

Settings in Eclipse to support other languages

The following settings should be made in eclipse if we want to display some special characters of other languages

Go to
Eclipse--->window-->preferences--->General--->Workspace-->TextFileEncoding

There you will find the option of text file encoding which you can select to UTF-8 to support special characters of other languages

The following screen shot explains the sam








e

Pass a HashMap from Angular Client to Spring boot API

This example is for the case where fileData is very huge and in json format   let map = new Map<string, string>()      map.set(this.ge...