Search:

Type: Posts; User: dicdic

Page 1 of 12 1 2 3 4

Search: Search took 0.69 seconds.

  1. Re: Begginer / why is this not printing? + loop not working

    your loop in your main method has initialization of countdown = 5 and a condition of countdown must be less than or equal 1 therefore that loop will never be executed.

    Once you fix that bug...
  2. Replies
    4
    Views
    15

    Re: error string index out of range

    you are trying to access element at index 10. But actually, the element with the highest index is 9.
    The length of the array is 10 (base count is 1). The highest index is 9 (base count is 0).
    ...
  3. Replies
    6
    Views
    12

    Re: Compile error - empty string?

    Can you copy and paste the error message?
  4. Replies
    4
    Views
    60

    Re: Printing random values from array list.

    Your can use Random class in java. Random (Java Platform SE 7 )
  5. Re: how to specify file: URL in my class path

    I'm not familiar with eclipse IDE. But what I remember, if you want to add a jar file or library, you better use the build path of the eclipse. Using that, you can configure adding another jar or...
  6. Thread: How to print?

    by dicdic
    Replies
    7
    Views
    12

    Re: How to print?

    Yes there is no need to use 2 dimensional array for printing just

    11 12 13 14 15
    7 8 9 10
    4 5 6
    2 3
    1

    but what if the number of rows varies? Let say there is an input.
    Let say the users in...
  7. Thread: How to print?

    by dicdic
    Replies
    7
    Views
    12

    Re: How to print?

    I think it would be better if you have a 2 dimensional array.
    1st element of array is array with single element: 1
    2nd element of array is array with 2 elements: 2, 3
    3rd element of array is array...
  8. Thread: Help needed

    by dicdic
    Replies
    12
    Views
    21

    Re: Help!!!

    Please read String (Java Platform SE 7 )
    String object in java is capable of replacing the first occurrence of the specified word.
  9. Thread: Help needed

    by dicdic
    Replies
    12
    Views
    21

    Re: What is wrong with my Code

    Thread same as http://www.javaprogrammingforums.com/whats-wrong-my-code/37871-help-needed.html#post148968
  10. Thread: Help needed

    by dicdic
    Replies
    12
    Views
    21

    Re: What is wrong with my Code

    Thread same as http://www.javaprogrammingforums.com/whats-wrong-my-code/37871-help-needed.html#post148968
  11. Thread: Array problem

    by dicdic
    Replies
    3
    Views
    11

    Re: Array problem

    Welcome to the forum! Please read this Announcements - What's Wrong With My Code?

    No members here will provide a code for you. If you want some help, just show some effort (a simple coding) then...
  12. Thread: java

    by dicdic
    Replies
    3
    Views
    24

    Re: java

    Hi! Welcome to forum! Please read Announcements - What's Wrong With My Code?

    Don't quit if you love java :D
    I think you just need enough time to learn, you also need some experience (maybe some...
  13. Replies
    9
    Views
    22

    Re: Print to file with Java

    Welcome! Please read Announcements - What's Wrong With My Code?

    You can do internet search to find a way on how to read from and write into a file. Then try to code it for yourself. Once you have...
  14. Thread: Help needed

    by dicdic
    Replies
    12
    Views
    21

    Re: Help needed

    Scanner's reading method has a return type of String Scanner (Java Platform SE 7 )
    and String is capable of converting a text into uppercase or lower case String (Java Platform SE 7 )
  15. Replies
    12
    Views
    23

    Re: Loop is not working in calcualtion program

    Actually the reason of it being zero is because your input is less than 80000. And you never overwrite it inside the loop.
    Try to input a value of greater than 80000. it will change even though it...
  16. Replies
    12
    Views
    23

    Re: Loop is not working in calcualtion program

    your annualTotal has initial value of 0. And it will only overwrite when the input is greater than or equal to 80000 if (annualSales >= 80000) otherwise it will still be 0.

    Try to input a value...
  17. Re: Combining multiple uploaded documents into one report

    It would be easy for you to do that in JSF. Try Primefaces or Richfaces (I'm not sure if there is also one in Icefaces)
  18. Replies
    12
    Views
    23

    Re: Loop is not working in calcualtion program

    First, you better put your codes in code tags so it would be easy for us to read

    -There is a semi colon at the end of your loop.
    And please put braces in your loop even though it has only one...
  19. Re: How do you return a array from a method, back into the main method that prints out stuff?

    just make a return type of array.
    Example:


    public int[] myIntArray() {
    int[] myArr = new int[3]; // creating an array with length of 3
    // assigning desired value for each element
    ...
  20. Replies
    3
    Views
    7

    Re: Java simple program error?

    in statement Student obj = new Student(Jim,Jones); java assumed that Jim and Jones are variables but you never declared them as a String variables.
    So if you want to pass Jim and Jones as a String...
  21. Re: Convert Numbers from -999 to 999 in words!

    can you paste your whole code?

    --- Update ---

    Ok, I think I figured it out.
    see this conditions in your code:
    if (number > 99 && number < 1000)
    if (x > 0 && x < 100)
  22. Re: Error using printf function across classes

    it would be better it you post of your code.
  23. Re: Convert Numbers from -999 to 999 in words!

    Is it necessary to use a switch statement? Actually you can use another algorithm which is better than that and an easy way of converting number figures to words. Ex:

    Assign an array of String...
  24. Re: how to call parameterized stored procedue in jdbc

    I'm not good in sql server (Actually I have no experience on it).
    But in the database that I used now in my work, we declare an output parameter. Output parameter is different from input parameter....
  25. Replies
    1
    Views
    6

    Re: Declaring paramters in java class

    you cannot declare a field name with invalid characters. dot ( . ) is not a valid character for declaring a field name.
    kindly see this: Variables (The Java™ Tutorials > Learning the Java Language >...
Results 1 to 25 of 284
Page 1 of 12 1 2 3 4