Search This Blog

Java: parse octal number from string and format string to represent octal number

        int mode = Integer.parseInt("0644", 8);
        System.out.println(String.format("%04o", mode));

No comments:

Post a Comment