Search:

Type: Posts; User: luck999

Page 1 of 2 1 2

Search: Search took 0.25 seconds.

  1. Replies
    1
    Views
    958

    How can I store a double array in mysql

    Hi All,

    I faced a problem to store a double array in mysql, the array is dynamic and is better to store as a field in mysql.

    Any suggestion and advice are appreciated.

    Thanks very much.
  2. Replies
    2
    Views
    534

    Re: Printing a Combination

    Your code works fine on my PC. The problem might be caused by other reason.
  3. Replies
    13
    Views
    546

    Re: Problem with the loop ..... ;(

    From your code, a and A have the same purpose. Both of them are to counter the letters of 'a' and 'A'. So you need only one of them and can delete another one.
  4. Replies
    4
    Views
    1,466

    Re: jTable to Array

    You can read value of each cells you want, by this Jtable method getValueAt(int rowIndex, int columnIndex), then add values to the output array.
  5. Re: Switch problem. How do I return to my menu?

    I think you can add:


    for (int i = 0; i < options.length; i++) {
    System.out.println((i+1) + ":\t" + options[i] + " ");
    }
    option= input.nextInt();

    before every break.
  6. Replies
    6
    Views
    536

    Re: Need help with user imput

    errors could be fixed by changing scan.nextDouble; to scan.nextDouble(); and scan.nextInt; to scan.nextInt();

    There is no method of prinln(), I think it should be println();
  7. Replies
    4
    Views
    585

    Re: Arrays (Beginer)

    For problems similar getting cheapest price is not a problem of java, is really a normal problem of algorithm design. It is better for you to read some algorithm design book to understand how to...
  8. Replies
    1
    Views
    1,084

    Re: Exception in JUnit test (easy question)

    I might do not understand your question. But from my experience, I never added any exception in Junit because Junit is only to test what your code (class) is okay. all possible exceptions need to be...
  9. Replies
    2
    Views
    815

    Re: Streaming data to html problem

    I am studying servlet now. As I know, your problem might be caused by limit of outputbuffer size. You can also set max rows for each query and run query for serveral times, not only one time.

    I...
  10. Replies
    8
    Views
    323

    Re: need help with a function...

    you has not declared these two variables in the method of aboveOrBelow

    your method could be modified as followling, than called in the main method:



    public static String aboveOrBelow (double...
  11. Re: Method for a table for calculation - help!

    As I know, to print such table in the screen, you need nested do-while loops,such as
    do{
    do{
    }while();
    }while();
  12. Replies
    3
    Views
    302

    Re: Simple I/O Java Error

    I think you are wrong in this line:
    array[i] = Integer.parseInt(k);

    "*,/,+,-" may could not be parsered into an int.
  13. Replies
    3
    Views
    557

    Re: Creating an Intstance in an ArrayList

    ArrayList <PhoneBook> entries=new ArrayList<PhoneBook>();
    entries.add(new PhoneBook("Greg","478-454-7605"));
    entries.add(new PhoneBook("Peter","478-448-7975"));
    entries.add(new...
  14. Replies
    3
    Views
    775

    Re: help me terminate the infinite loop.

    lol will become 0 when your code exits from while loop, so it will never greater than q. Then your for loop will not reach the end.
  15. Re: Can someone please tell me why my do while loop isn't working?

    It seems working fine on my PC:



    What do you want the future value to be?
    2
    What is the annual percentage rate?
    3
    How long will you keep your money in the account? (in years)
    4
  16. Re: Can someone please tell me why my do while loop isn't working?

    replace keyboard.nextLine() to keyboard.next()
  17. Re: Can someone please tell me why my do while loop isn't working?

    present should be declared before while loop
  18. Re: Can someone please tell me why my do while loop isn't working?

    char runAgain;
    String input;

    should be declared in presentValue
  19. Re: Can someone please tell me why my do while loop isn't working?

    In your code, the variable runAgain is not assigned, so you can not continue to run your code repeatedly.

    just modify the line: repeat = input.charAt(0) to runAgain = input.charAt(0)
  20. Replies
    20
    Views
    1,492

    [SOLVED] Re: Nested Loops & Processing Strings

    I think you need to read each character from the last string at first, then implement your second part code. For example:


    for (int j =0; j < last.length(); j++){
    int asciiValue =...
  21. Replies
    3
    Views
    283

    Re: Having problem to stop reading strings

    could you pls post more of your code? It's hard for me to understand your code.
  22. Replies
    2
    Views
    336

    Re: Help with overriding

    please read this document, it might be helpful.
    Java - Overriding
  23. Replies
    1
    Views
    500

    Re: Return variable from an URL.

    As I know, there are two ways to exact a return variable from an url. One way is using API developed by the website if there is. The other way is that you might need to parse the source code of the...
  24. Thread: Variable Error

    by luck999
    Replies
    2
    Views
    274

    Re: Variable Error

    I think your should modify your second method first, since the vans is not used, and bus is not claimed.



    public static int vans(int vans){
    int rem = vans % 45;
    if (rem % 45== 0)
    return (0);...
  25. Replies
    3
    Views
    251

    Re: printing factors with 2 classes

    public class chapter7number10 {

    public chapter7number10(int a)
    {
    factor = a;
    }
    public void hasMoreFactors()
    {
    System.out.println("one of the factor's...
Results 1 to 25 of 36
Page 1 of 2 1 2