My Tech Notes

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:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: develop, java
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

Total Pageviews

Theme images by Naseko. Powered by Blogger.