function libary

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tolkienarda
    Contributor
    • Dec 2006
    • 316

    function libary

    hi all

    i am trying to learn java, i currently develop in php and mysql and i have gotten used to the documentation at php.net, all i have to do is type in a function name like php.net/isint and it takes me to a page of documentation on that function and lists several user examples, i was wondering if there is anything similar in java. and if anyone knows is there an prebuilt function to check if there is a function that checks to see if a variable is an int.

    thanks

    eric
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by tolkienarda
    hi all

    i am trying to learn java, i currently develop in php and mysql and i have gotten used to the documentation at php.net, all i have to do is type in a function name like php.net/isint and it takes me to a page of documentation on that function and lists several user examples, i was wondering if there is anything similar in java. and if anyone knows is there an prebuilt function to check if there is a function that checks to see if a variable is an int.

    thanks

    eric
    First, bookmark this page.
    Now unlike PHP, Java is strongly typed. Every variable's type must be known and specified at declaration time so an isInt function wouldn't make much sense since int is a primitive type anyway.
    If you meant how to check if a String's value is convertible to an int, then you can use Integer.parseIn t to actually convert the string to int and catch an IllegalArgument Exception. If the exception is thrown, your value is not an int.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      For Java you have to get used to the API java documentation. It doesn't give
      you direct search options that you can type in but it uses hyperlinks all over
      the place. You'll get used to it. The best option (IMHO) is to download the entire
      thing and bookmark it in your browser.

      kind regards,

      Jos

      Comment

      • kreagan
        New Member
        • Aug 2007
        • 153

        #4
        Originally posted by r035198x
        First, bookmark this page.
        This link doesn't contain the direct API link.
        API

        Comment

        • tolkienarda
          Contributor
          • Dec 2006
          • 316

          #5
          thank you all
          i learned everything in know about php from this site and i can see that you java guys are just as helpful as the php crew

          thanks a million
          eric

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by tolkienarda
            thank you all
            i learned everything in know about php from this site and i can see that you java guys are just as helpful as the php crew

            thanks a million
            eric
            You're welcome of course. Java is just a little language but it has a huge core
            set of classes. Basically it boils down to this: you don't have to do much programming
            if you make good use of those core classes; everything else is just a bit of ifs,
            loops, a few methods and classes, a few patterns, and what have you ...

            kind regards,

            Jos

            Comment

            • praveen2gupta
              New Member
              • May 2007
              • 200

              #7
              Originally posted by tolkienarda
              hi all

              i am trying to learn java, i currently develop in php and mysql and i have gotten used to the documentation at php.net, all i have to do is type in a function name like php.net/isint and it takes me to a page of documentation on that function and lists several user examples, i was wondering if there is anything similar in java. and if anyone knows is there an prebuilt function to check if there is a function that checks to see if a variable is an int.

              thanks

              eric
              Hi
              java works differently. You should start from scratch and read the API documents. Java ia having a huge resources in terms of methods and classes .All your nedd is available in java.

              Comment

              Working...