Created
June 30, 2015 15:40
-
-
Save dmikurube/608dc53ff3ecd5810482 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.BufferedWriter; | |
| import java.io.IOException; | |
| import java.nio.charset.Charset; | |
| import java.nio.file.Files; | |
| import java.nio.file.Paths; | |
| import java.nio.file.StandardOpenOption; | |
| public class Symbols { | |
| public static void main(String[] args) throws IOException { | |
| BufferedWriter writer = Files.newBufferedWriter(Paths.get("hoge"), Charset.forName("UTF-8"), StandardOpenOption.CREATE_NEW); | |
| String EUR = "\u20AC"; | |
| String GBP = "\u00A3"; | |
| String JPY = "\u00A5"; | |
| writer.write(EUR); | |
| writer.newLine(); | |
| writer.write(GBP); | |
| writer.newLine(); | |
| writer.write(JPY); | |
| writer.newLine(); | |
| writer.write('\u0061'); | |
| writer.newLine(); | |
| writer.write('\u3042'); | |
| writer.newLine(); | |
| writer.close(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment