User Profile

Collapse

Profile Sidebar

Collapse
javaalien
javaalien
Last Activity: Jun 20 '07, 11:49 AM
Joined: May 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thank you very much for all the advice.
    Of course I take note all of your precious advice to me...
    I am here to consult from you guys that must be very experienced and already be there before me....So by asking some sort of silly questions (to you guys but not for me, because I really don't know) so I will get some feedback, am I doing right or maybe that's not even possible..that' s it.
    I am learning and sorry for making any...
    See more | Go to post

    Leave a comment:


  • Ok Jos, It's a caution matter to me, I do need to put something that if the thing is going to happen..not more than that....
    See more | Go to post

    Leave a comment:


  • Thank you.
    If my rewrite my question to long type, how am I going to solve it then?
    It just that I can't wait for it to keep counting after exceed limit , better I stop the execution or give some kind of alert....
    See more | Go to post

    Leave a comment:


  • Need an assistance on how to put this kind of alert in my program...
    Lat's say I assign a counter which suppose to count how many word 'A' in a text file. So how am I supposed to do to alert me when it's already achieve max limit? I can't wait until the execution to finish and returns -ve value or false value.
    So when it reach int limit (2^31-1), it suppose stop the execution (or at least pop up an alert or etc). Is this possible to...
    See more | Go to post

    Leave a comment:


  • javaalien
    replied to how to check
    in Java
    Sorry jos, I do not need that modulo..any way thank you for trying & really appreciate it.
    Maybe I should ask like this - (let's assume that counter is keep increasing and stops when it reach max limit (2^31-1) )

    for int type, the counter will keep increase ( initialized start from 1) and return any value between 1 and MAX_VALUE without any doubt?
    Meaning to say there's no possibility that it will count back to...
    See more | Go to post

    Leave a comment:


  • javaalien
    replied to how to check
    in Java
    My apologize to you too.
    My lecturer's said that, check you java program and make sure that it doesn't return wrong int value (counter).
    for eg:
    Code:
    counter = 1;
    counter++
    result could be:
    1, 2, 3....., 9 and
    how to make sure the counter keeps increasing to 10, 11, 12 ant etc?

    Is that true when counter keeps increasing 1, 2, 3...9 and when it comes to 10, it comes back to count from 0,...
    See more | Go to post

    Leave a comment:


  • Actually that's the answer that I am looking for..I do need to know if a very large application with many iterations (I do not know how big it is but it just a caution)
    what counter type that I need to initialize?
    something like to check counter++ will return an int value...
    So from your experience, how many iteration of any large application (the longest) could be? care to explain for me please..thank you....
    See more | Go to post

    Leave a comment:


  • Yeah, you're right..
    Better use BigInteger type - but then how to initiliaze it, same as standard initialization for the other types? kindly please share some tips..thank you...
    See more | Go to post

    Leave a comment:


  • javaalien
    replied to to create exe file
    in Java
    To count words in a text file.
    So I just need to click on the exe file to start counting.....
    Now I need to compile my application to jar ? thank you...
    See more | Go to post

    Leave a comment:


  • javaalien
    started a topic to create exe file
    in Java

    to create exe file

    Could anyone gimme some inputs on how to create an exe file?
    This exe program is a counter to count how many of something - let's say
    "hello world" in a text file? Kindly please share some tips with me..
    Thank you in advance
    See more | Go to post

  • [QUOTE=JosAH]You don't have to specify that number yourself. It's already done for you. Read
    the API documentation for the Integer class. While your at it there's also a Long,
    Short, Character, Byte etc. classes. They all implement public static final values
    indicating the maximum and minimum values their corresponding primitives can
    hold. When you add one to the maximum value or subtract one from the minimum
    value,...
    See more | Go to post

    Leave a comment:


  • Yeah, it returns -2^31. By looking at the output (negative integers) so we know that it exceeds limit.
    What happen when the counter keeps counting (probably big program and MANY iterations) until it returns positive integer? And we just take the output as an answer, Is that possible? How to know that our counter type is catered to store any output num?...
    See more | Go to post

    Leave a comment:


  • Thank you ...
    You mean this syntax?
    Code:
    public static final int   MAX_VALUE = 0x7fffffff;
    How I am going to initialize my counter? besides the standard initialize :
    Code:
    int counter;
    One more thing, what would happen when my counter exceeds the max value?
    Is there any prompt error? It just that I want to make sure my counter returns correct (without exceeding) value....
    See more | Go to post

    Leave a comment:


  • Integer type.
    Is there any method that I could check it despite initialize int type the max would be 32 lenght?...
    See more | Go to post

    Leave a comment:


  • javaalien
    started a topic Java method to check variable (counter) max length
    in Java

    Java method to check variable (counter) max length

    Kindly please anyone who knows is the any method to know
    what is the limit of length of a counter?
    Depsite from initiliazed variable's types (either int, byte, long etc)
    is there any way for me to check my variable (counter)'s max lenght?
    Please share the info with me...
    Thank you in advance.
    See more | Go to post

  • javaalien
    replied to need to confirm - ArrayList size()
    in Java
    How to do that please?
    I have tried this - java -Xmx1024m, but comes out all the usage..
    Do I have to do this first and then only run my application?...
    See more | Go to post

    Leave a comment:


  • javaalien
    started a topic how to check
    in Java

    how to check

    Kindly please anyone here helps me how to check in my program, the primitive type - int doesn't return 0 instead of 1 when it returns number between 0 - 9?

    Normally for int - it when it comes to digit 10 - it change to '0'...
    How to make sure / see my program returns correct returns decimal digit?
    Thank you in advance
    See more | Go to post

  • javaalien
    started a topic need to confirm - ArrayList size()
    in Java

    need to confirm - ArrayList size()

    Guys, what is the max size for ArrayList size()?
    I have arraylist with size up to 4 000 000, is there any problem with it...
    my application's running so slow when my arraylist size up to 2 000 000.
    Please confirm with me..
    Thank you.
    See more | Go to post

  • javaalien
    replied to counting string lenght
    in Java
    Thank you, got it :)...
    See more | Go to post

    Leave a comment:


  • javaalien
    replied to selection
    in Java
    Thank you very much. Kindly please check below code again:
    Code:
    if(a >b)
     go path 1
    else
      go path 2
    Code:
    a?
     go path 1
     : 
      go path 2
    Do you agree with me if I say they are the same?...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...