Search:

Type: Posts; User: paco

Page 1 of 2 1 2

Search: Search took 0.16 seconds.

  1. Replies
    6
    Views
    213

    Re: Trying to Find Recursion and Loop Limit

    I dont understand how I would use the method you gave me to keep it continuously counting until stackoverflow occurs. Would I call on it as soon as I call on my 2 other methods?

    UPDATE: Also if...
  2. Replies
    6
    Views
    213

    Re: Trying to Find Recursion and Loop Limit

    I still do not understand what you are doing, how would I call on that method and would I use it for both or just the recursive method? Also, how did you get 10816? If I input the fibonacci number of...
  3. Replies
    6
    Views
    213

    Re: Trying to Find Recursion and Loop Limit

    Yes you are right, I am looking for the largest number in the Fibonacci sequence that will result in stackOverFlow. If I input a very large number though I don't actually get stack-overflow, eclipse...
  4. Replies
    6
    Views
    213

    Trying to Find Recursion and Loop Limit

    hello, I am doing some code on calculating the fibonacci sequence in 2 different methods, one is through recursion and the other is through a for loop. And so, I am trying to figure out the max value...
  5. Replies
    13
    Views
    289

    Re: BMI Calculator, (boolean problem)

    thanks for the comment jdv. I realize what you are saying and I am going to redo some of the code right now and perhaps I will use 2 methods for the metric and imperial calculation, will post soon,...
  6. Replies
    13
    Views
    289

    Re: BMI Calculator, (boolean problem)

    its OK i did not use your code anyways as some parts of it I did understand
  7. Replies
    13
    Views
    289

    Re: BMI Calculator, (boolean problem)

    I mean its not an error but just the exclamation mark comes up before I even run my code on the side
  8. Replies
    13
    Views
    289

    Re: BMI Calculator, (boolean problem)

    Hey, Im not sure what you mean by that given code, aBooleanVar. Also, when I change "==" to '=" I get an error "Cannot convert from int to boolean". Shouldn't it function using the assignment...
  9. Replies
    13
    Views
    289

    BMI Calculator, (boolean problem)

    Hello, I am making a BMI calculator that is pretty much complete but I am currently stuck on an issue with a boolean, here is my code :



    import java.util.Scanner;
    public class BMI
    {
    public...
  10. Re: Keeping track of found objects in array and smallest value

    Im aware of that but am I just trying to make it fool proof, as in what if there happens to be 7 or n + 1 matches then it has to be an array of 7 elements, and since my array is one of the first...
  11. Re: Keeping track of found objects in array and smallest value

    I have set my original 2 arrays to 10, so now if I make a third array to copy my 2nd array to, then there will be some slots that will be filled with 0's and those will get copied over. I guess I...
  12. Re: Keeping track of found objects in array and smallest value

    I dont know what array list is, havent learned that yet, also if I were to move it to another array, say ar1 = ar2 wouldn't they just be the same size and the same outcome would happen?
  13. Re: Keeping track of found objects in array and smallest value

    ok I will try now, thanks, thought there might have been another way/method
  14. Re: Keeping track of found objects in array and smallest value

    Yes I am trying to change the size of the ray and make it equal to my count which would have been the amount of times where my title and ISBN are the same. That way only the ones that are found will...
  15. Re: Keeping track of found objects in array and smallest value

    By looking at my code is that what you recommend I should do?
  16. Re: Keeping track of found objects in array and smallest value

    yea got that part :D took some time though, i am very slow.

    update: i still am stuck at this, my problem is valueFound[i] = k; . I dont know how to get around this, I can't declare my second...
  17. Re: Keeping track of found objects in array and smallest value

    reversed those 2 and my first part is working again.



    valueFound[i] = k;


    but now output:
  18. Re: Keeping track of found objects in array and smallest value

    I just ran it and got:

    Please enter a book title:
    ho
    Please enter a ISBN number:
    1001
    The book title is ho, the ISBN number is 1001 and the price is 70.0$.

    Index Information At Index...
  19. Re: Keeping track of found objects in array and smallest value

    "set smallest value variable to the first element in the list
    begin loop starting at the second element in the list"

    whats wrong with the way I have it above? If I am checking all the values of...
  20. Re: Keeping track of found objects in array and smallest value

    the first for loop goes through my list checking for books with the same price and ISBN # and then stores where they are located in that array, into a separate array (i want to change the price...
  21. Re: Keeping track of found objects in array and smallest value

    thanks for stating the obvious, I was hoping for an example, but I guess you think I am being lazy and want you to spit out the answer...WRONG! I am deeply confused and need help, heres my attempt,...
  22. Re: Keeping track of found objects in array and smallest value

    how do I keep track of the values stored and then find the smallest of those values using my above code and my other class (down below), is the question.



    class Book {
    //Attributes of Book
    ...
  23. Re: Keeping track of found objects in array and smallest value

    I have to keep my array like this in my book class:
    update:


    import java.util.Random;
    import java.util.Scanner;
    public class ModifyBooks {

    public static void main(String[] args) {
  24. Keeping track of found objects in array and smallest value

    Hello I am trying to devise some code to store the index values of where I have found a book title and key code (which will be ISBN) in an array, I am stuck at here



    for (int k = 0; k <...
  25. Replies
    10
    Views
    248

    Re: How to search through values of Array?

    can you please explain this piece of code to me and the use for it? I am trying to understand it why the scanner is being used and what bookData is doing. thanks



    // Create 10 books with the...
Results 1 to 25 of 30
Page 1 of 2 1 2