Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Formatting Integer Display in Java

  • 07-01-2007 4:39pm
    #1
    Closed Accounts Posts: 636 ✭✭✭


    Ok. How do I set format an integer so that it prints out a certain amount of numbers. There is no code for this really but I'll try somthing.


    public class x{
    public static void main(String args[])
    {
    int x;
    x=7;
    System.out.println(x);
    }
    }


    So this will print "7" to the screen. What I want to know is how do I print "07" to the screen?
    __________________


Comments

Advertisement