How can I display error if the input is not a number?

I thought I knew how, but I am not sure on what is what in the ASCII character list.
I need check for errors if the user inputs anything except a positive integer. How could I do that? I had something like this:
int number;     
if ((number<0)||(number>80))
          System.out.println(Error please enter a new value
     }But that only filters out negatives, I have tried a few different ways but I cant get it. I dont know why I cant figure it out, its easy, but either way what would I put on the if () line?

http://asciitable.com
Wait so I would do
if ((number<=48)||(number>=57)
      statements......
}I thought I tried that and it didnt work, but I will try again. Since number is an int, will it still work? And do I need to do '48' with the ' around it?
Thanks

Similar Messages

  • My inbox indicates a message is receive but all my message are open and so how can I fix this that the inbox will not indicate that I receive a message (one)

    my inbox indicates a message is receive but all my message are open and so how can I fix this that the inbox will not indicate that I receive a message. It shows that I received one message?

    lbryan1987 wrote:
    I dont want the button problem solved i need to know how to restore the phone without using that button or going into settings
    You don't in the condition it's in. You will either have to get the phone replaced by Apple or pay a 3rd party to repair it.
    there seriously should be more than two ways to solve this other wise apple is useless and we will never buy another apple product.
    Seriously? It's physically broken!

  • How can unlock my Iphone if the Carrier does not offer this service?

    How can unlock my Iphone if the Carrier does not offer this service?

    This is an iPad forum ... for issues dealing with iPhone, go here ...
    Using iPhone

  • How can i display data in the table?

    i have a vi that reading the data 1 by 1 (according on what you have chosen)data is displaying in the the table, also 1 by 1 in 1 column only.
    I want them to look like this:
    apple | epol | apol
    mango | manga| maga
    (if it is Ok, can i have an example how can i do this?)
    Thank You

    In LabView 6 or 7, you can use a table control. You can control the displayed size programmaitcally with a property node or by editing the front panel control.
    Look at the table examples that ship with LabView. From any LabView window, goto Help >> Find Examples >> Search, then enter TABLE ins the box labeled Type a keyword to find.

  • How can I display labels in the margin on last page

    I would like to display a label and a line (for a signature) on the last page of my report at the bottom of the report. This has to be displayed after all the other report details have been displayed and should appear only on the last page. How can I do it? Please help.

    You can move the label and the line for the signature into a frame and place the frame at the end of your report. Then set the "Print Object On" property for the frame to Last Page.

  • In Ztable creation, How can we display error message for a 'To date' field.

    Hi all,
    I have a requirement like this.
    There r two fields in ztable. From date and To date.
    The field 'To date' in table ZKM007 is taking before date than From date field.
    To date should always be greater than from date i need to throw an  error or don't  allow to enter date  if date is less than From date.
    How can we do this?
    Can any one help on this?
    Rewards to all.
    Thanks & Regards,
    Anu.

    I have written below code at event "Creating a new entry" (05) in table maintainance generator.But it is not working. If we give the to date < From date ,
    it is saving.
    Can any one help on this code? Pls Give me code And which event i have to put this?
    ***INCLUDE LZEXE3F01 .
    FORM AT_entry.
    IF ZEXE3-TODATE LT ZEXE3-FROMDATE.
      MESSAGE I001(0) WITH 'ENTER TO DATE GREATER THAN FROM DATE'.
    ENDIF.
    ENDFORM.
    Rewards to all.
    thanks
    Anu.

  • How can I display and use the full RAW file?

    Hi,
    my camera (Canon S95) has a sensor with 4:3 aspect ratio and thus saves all RAW files in this format. Additionally, the camera can automatically create JPGs with a cropped ratio (e.g. 3:2 or 16:9). This is very helpful because you can see the target format already on the camera screen (with black bars on top and bottom), which helps the composition. However, when processing the photos on the big screen afterwards, it often also helps the photo to adjust the ratio a little bit and therefore use the additional information saved in the bigger 4:3 RAW file. This works very well with many of the freely available software tools.
    The problem found in Lightroom is now that it only shows the RAW photo in the cropped format and up to know I have found no way to display or use the full RAW format. So my question is: Which settings do I have to change to use the full format? What do I need to change?
    Searching a little bit on the web I found many other photographes having the exactly same problem with many different cameras. However none of them reported to have a solution for this. Still I am pretty sure that there must be a solution, since otherwise this would be a really heavy bug within Lightroom and I cannot imagine that Adobe would leave this matter unsolved.
    So I would really appreciate if someone could help me with this.
    Many Thanks
    Martin

    Hi Jao, Victoria, Lee Jay,
    Thanks for clearification. Do you have additional information about when this fix will be available and whether at least some popular old cameras will be supported?
    What I do not get is why Adobe would need to redo all existing cameras. I think this is a more general issue, where Lightroom misinterpretes the exif data which includes both the exif image height/width as well as the cropped image height/width. Intepreting this information correctly, any software should be able to display both - the full image and the cropped area (as shown by many cheap or free software tools). In the internet I found another workaround for the issue in Lightroom, which is undermining this point: When setting the cropped image height/width to the numbers of exif image height/width manually (e.g. with exif tools), Lightroom actually is able to display the full 4:3 picture.
    So this bug should be easily fixed for all cameras and I have no clue why Adobe still has no fixed it with Lightroom already available in version 4.2.
    Cheers
    Martin

  • How can we display date on the home screen on 5800

    Hi,
       I am not able to find a way to display the date along with time on home screen.
    Solved!
    Go to Solution.

    At the centre top portion of 5800 homescreen, it displays the Telecommunication Operator name and the profile chosen as well as the DATE. If you have chosen any other profile than General, then the date will not show up. Please verify if you are on General Profile by simply tapping the profile name (General/Silent/Offline/Meeting etc) and a drop down list will appear for you to change your profile.
    Alternatively, you can go to Menu > Setting > Personal > Profile to change your active profile.
    Please hit Kudos if it helped, thanks!
    was: 3310--> N80 v5.0719.0.2--> N82 v31.0.016; now: 5800xm v40
    KeN82Ny

  • How can i control error in batch input ?

    i run program with recording ( batch input on F-03 )  ,
    i want to give the user the option to :
    only fix the problem  and continue the process
    end batch input and go back to the main program .
    is there is option to do so  ?
    in which mode it can be done  ('E' ? ) .
    the reason that i need this option is
    data with fast changes .
    thanks .

    thanks any one  ,
    may be i was not clear inough  ,
    i know what is mode 'E' .
    i want to let him fix the field only
    i don't want to allowed him to go to other screen
    just do update to the field and proceed.
    is there option to do so ?
    thanks again , and sure i will award points  .

  • HT1848 How can I add photos to the iPad while not deleting any currently on it? I have some photos from my brother's camera that I can't get again.  How could save them onto my iMac?

    I have uploaded photos from my brother's camera while on vacation to my iPad (1).  Now that I wish to add even more photos to the iPad,  iTunes say that it will replace all the photos once I sync again to add from an album on the iMac.
    WHOA.
    I'd like to upload the photos to the iMac! HOw can I do that?
    How can I add photos from albums on the iMac and not lose the ones I currently have stored onthe iPad.
    I cannot find this task addressed in any Help reference.
    I do not understand why I cannot make a simple file transfer back and forth.
    Many thanks!

    Another way. You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
    Secrets of the iPad Camera Connection Kit
    http://howto.cnet.com/8301-11310_39-57401068-285/secrets-of-the-ipad-camera-conn ection-kit/
     Cheers, Tom

  • How can we let logic in the implemetation process not to squeeze together?

    Hi xilinx expert:
               There are three clk domain in my project . green, yellow and red clk domain. i don't understand why they are all place in the lower part of the device. All logic is squeeze together in the lower part, and the upper part is empty. The design did not meet timing requirements.
                How can i get the yellow and green clk domain logic layout to the upper part of the device?

    We had the same problem.  PBlocks are your friend.  You can chose which logic you want to move and where you want to place it, including having overlapping blocks.  We do things like:
    set N 11;
    set PB [create_pblock Cust_$N]
    add_cells_to_pblock $PB [get_cells -hier -filter [list NAME =~ *\[$N\].mCustPort]]
    resize_pblock $PB -add {SLICE_X158Y488:SLICE_X165Y498}
    resize_pblock $PB -add {DSP48_X13Y196:DSP48_X14Y199}
    set PB [create_pblock Cust_$N\_RX]
    add_cells_to_pblock $PB [get_cells -hier -filter [list NAME =~ *\[$N\]*mDecode*]]
    add_cells_to_pblock $PB [get_cells -hier -filter [list NAME =~ *\[$N\]*mFifoRx*]]
    resize_pblock $PB -add {SLICE_X170Y488:SLICE_X191Y498}
    resize_pblock $PB -add {DSP48_X15Y196:DSP48_X16Y199}
    resize_pblock $PB -add {RAMB36_X11Y98:RAMB36_X11Y99}
    The results look like this:
    It is hard to see why you cannot use this to solve your problems.
     

  • How can i  display output in the same selection screen?

    I've a requirement. Suppose in my selection screen there are three input fields. On the basis of this selection screens input It will  display the output in the same selection screen. Can it be possible? .
    Can it be possible to modify the default screen no for the selection screen 1000?
    Thanks in advance.
    Abhijit

    Hi Abijit,
    Whatever changes made in STANDARD SELECETION SCREEN 1000 or screens generated using 'SELECTION-SCREEN' statements, are not permanent.
    It will get back to its original appearance, while you execute again or some time later.
    Whenever you get into 'CHANGE' mode of these screens, an information will be displayed as follows ;
    Selection screen: Report generation makes screen
    changes ineffective
    Regards,
    R.Nagarajan.

  • How can I display error log of a standard program in my custom program?

    Hello Experts,
    I have a requirement where I submit a standard program from my custom module pool program as a background job. I use the TO SAP-SPOOL and thus the log is available when I go to SM37 and check the spool list. I have a requirement that I display this log in a tab within my module pool after the completion of the program. I am unable to fins a proper solution to this. I have both the spool number & the log number but I am unable to find function modules which will help me print them within my program. I found many ways to display it but as full screen and not with in my program.
    Could someone please help me with this.
    Thank You

    Hi,
    FM to read a spool request is "RSPO_RETURN_ABAP_SPOOLJOB".
    If the error log is displayed as a list output in the standard program, you can also use the syntax SUBMIT Program... and RETURN with export to memory addition.
    Then you will be able to read the list output from memory.
    Regards,
    Munesh.

  • How can I display playlists on the side and all my music?

    I want to list my playlists on the left and have my entire library in the main window to the right, but the new Itunes can't seem to do this.  Or at least I can't figure it out.  I want to be able to search and then drag songs into a playlist.  Can't seem to do that now.  Am I missing something?  How else do I compile a playlist?

    In iTunes 11 if you open a playlist you wish to add songs to there is an "Add To..." button at the to p right you can use to put the playlist on the right and your library on the left. If you want to go back to the old way click on the Veiw menu at the top and then "Show Sidebar" to get it fairly close to how iTunes 10 was.

  • How can I display icons on the bookmark bar?

    Does anyone know how to display a webpage's icon on the bookmark bar instead of the title? thanks!

    Use a JFrame not a JDialog.

Maybe you are looking for