Results 1 to 6 of 6
  1. #1
    mephisto772 is offline Member
    Join Date
    Feb 2009
    Posts
    3
    Rep Power
    0

    Question How to make a function?

    if example i will enter a number and the output will be in words, how will i do the function?

    ex.
    Enter number1: 1
    '' number2: 2
    " number 3: 3

    value= one hundred twenty three?

    pls just the funtion..

  2. #2
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    USE CODE TAGS--> [CODE]...[/CODE]
    Get NotePad++ (free)

  3. #3
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    That's probably about 100 lines of code. Give us a good reason to do your job for you.

  4. #4
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Thumbs up

    there is not any inbuilt function for that.... you have to make your own code in that you have to check total number of digit and according to that u have to check so much condition ...

    its very lenghthy

    ;)

    but its not difficult......
    Rakesh Mehta

  5. #5
    as_if is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Default

    Hello. How can I make getParameters(); function?

  6. #6
    as_if is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Question add function

    public class URL {

    public static void main(String[] args) {


    String letters = "something.com/prodhhhucta.aspx?product=1148117" +
    "&category=69977611&page=2&x=30&catalog=19";
    int i = letters.indexOf("?");

    String output = letters.substring(i+1);
    String delims = "&";
    StringTokenizer st = new StringTokenizer(output, delims);

    Vector v = new Vector();



    while(st.hasMoreTokens())
    {
    String token = st.nextToken();

    v.addElement(token);

    }


    Enumeration param = v.elements();
    while(param.hasMoreElements())
    {
    System.out.println(param.nextElement());
    }

    }
    }

    *****************************************
    This is my program. I want to add getParameters() function. But I don't know how can I do. Please help me. Thanks beforehand

Similar Threads

  1. How to make print function for single label?
    By makpandian in forum AWT / Swing
    Replies: 2
    Last Post: 02-12-2009, 06:26 PM
  2. Need help with get function
    By calicocal in forum New To Java
    Replies: 10
    Last Post: 11-09-2008, 08:59 PM
  3. Replies: 5
    Last Post: 08-26-2008, 04:43 PM
  4. Need a little help with a function!
    By Nuluvius in forum New To Java
    Replies: 3
    Last Post: 02-08-2008, 12:33 AM
  5. I want to add function
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •